Answers for "get data when only user exist laravel"

PHP
1

if notexists in laravel query

if (User::where('email', '=', Input::get('email'))->exists()) {
   // user found
}
Posted by: Guest on July-23-2020
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

Code answers related to "get data when only user exist laravel"

Browse Popular Code Answers by Language