count and where laravel code example
Example 1: count in laravel'
$count = ModelName::where('id',$id)->count();
Example 2: count with condition laravel
$user = User::where('user_id' , 10);
$user->count();
$count = ModelName::where('id',$id)->count();
$user = User::where('user_id' , 10);
$user->count();