count in laravel'
$count = ModelName::where('id',$id)->count();
get count laravel
$count = Model::where('status','=','1')->count();
{{count laravel
{{ $threads->count() }}
laravel eloquent remove from db
public function destroy($id){
$res=User::find($id)->delete();
if ($res){
$data=[
'status'=>'1',
'msg'=>'success'
];
}else{
$data=[
'status'=>'0',
'msg'=>'fail'
];
return response()->json($data);
count with condition laravel
$user = User::where('user_id' , 10);
$user->count();
check count in laravel
$wordlist = Wordlist::where('id', '<=', $correctedComparisons)->get();
$wordCount = $wordlist->count();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us