Answers for "laravel if exists"

PHP
1

laravel exist

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

laravel check record exists

$user = User::where('email', '=', Input::get('email'))->first();
if ($user === null) {
   // user doesn't exist
}
Posted by: Guest on April-08-2020
1

if notexists in laravel query

if (User::where('email', '=', Input::get('email'))->exists()) {
   // user found
}
Posted by: Guest on July-23-2020
1

laravel exist

if($user->isEmpty()){
    // has no records
}
Posted by: Guest on July-31-2021
1

check for an existing user laravel eloquent

$users = User::where('email', '=', $request->input('email'))->first();
if ($users === null) {
  // User does not exist
} else {
  // User exits
}
Posted by: Guest on August-18-2020

Browse Popular Code Answers by Language