public function clearOrphaned() { $tags = Tags::i()->allWithPostsCount(); foreach ($tags as $tag) { if ($tag->num == 0) { Tags::destroy($tag->id); } } Notifications::add('Empty tags removed', 'success'); return Redirect::back(); }