Ain
5 months ago

Count in controller

Posted 5 months ago by Ain

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.