Laravel + fluent, contar elementos?
Esto también te interesa!
PREGUNTAS SIMILARES
#2
#3
$query = DB::table('category_issue')
->select(array('issues.*', DB::raw('COUNT(issue_subscriptions.issue_id) as followers')))
->where('category_id', '=', 1)
->group_by('issues.id')
->order_by('followers', 'desc')
->get();