Count in controller
If we want a specific data to be count, we do like this
$judge = User::where('role_id','=','2')->get();
But what if we want to count how many record in database? Do we do it like this?
$group = Group::all()->get();
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!