Answers for "laravel exists check in eloquent"

PHP
1

laravel exist

if (User::where('email', $request->email)->exists()) {
   //email exists in user table
}
Posted by: Guest on July-31-2021
1

laravel 8 check if record exists

$subscription_count = DB::table('subscriptions')->where('pid_user',$pid_user)->count();

        //check if any subscription plan exists
        if($subscription_count == 0)
        { 
          //record does not exist 
        }else{
          //record exists
        }
Posted by: Guest on January-04-2022

Code answers related to "laravel exists check in eloquent"

Browse Popular Code Answers by Language