這是從我的TagsController我的索引行動:用Laravel 4計算關係和秩序?
if(Input::get('filter') == 'most-used')
{
$tags = Tag::with('questions')->orderBy('name', 'asc')->paginate(10);
return View::make('tags.index', compact('tags'));
}
我想與第一大多數問題的標籤。
你是怎麼做的?
在此先感謝!
難道要計算的問題多少? – Anam