Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How to check if email exists in laravel login

$validator = Validator::make($request->all(), [
        'email' => 'required|exists:users',
        'password' => 'required|string'
    ]);

    if ($validator->fails()) {
        flash('Email Does Not Exists')->error();
        
        // or 

        $request->session()->flash('message', 'Email Does Not Exists');
    }
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #How #check #email #exists #laravel #login
ADD COMMENT
Topic
Name
9+1 =