Answers for "laravel count using where and realtion"

PHP
10

count in laravel'

$count = ModelName::where('id',$id)->count();
Posted by: Guest on March-18-2021
4

count with condition laravel

$user = User::where('user_id' , 10);
$user->count();
Posted by: Guest on June-07-2020

Browse Popular Code Answers by Language