Answers for "laravel check record exists"

PHP
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
0

laravel how to check if there are record exists

//User::  User is going to be what model you use.
//$user can be what ever you need it to be
$user = User::where('email', '=', Input::get('email'))->first();
if ($user != null) {
   // Record does exist
}
Posted by: Guest on February-22-2021

Code answers related to "laravel check record exists"

Browse Popular Code Answers by Language