Answers for "user email verification in laravel"

PHP
1

laravel check if email is verified

$user->hasVerifiedEmail()
Posted by: Guest on September-19-2021
0

username or email validation in laravel

$input = $request->only('account'); // dont use all(), ever
            
$rules = [
  'account' => 'required'
];

if (filter_var($input['account'], FILTER_VALIDATE_EMAIL)) {

  $rules['account'] .= '|exists:users,email';

} else {

  $rules['account'] .= '|exists:users,username';

}

$messages = [
  'account.required' => 'Enter username or email to login.',                
];

$validator = Validator::make($input, $rules, $messages);
Posted by: Guest on April-27-2020

Code answers related to "user email verification in laravel"

Browse Popular Code Answers by Language