Walidacja e -mail w Laravel
'email' => 'required|email|unique:users,email',
//@sujay
$uj@y
'email' => 'required|email|unique:users,email',
//@sujay
<?php
$email = "[email protected]";
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo("$email is a valid email address");
} else {
echo("$email is not a valid email address");
}
?>
'user.email' => 'required|email|unique:users,email,'.$user->id,
//@sujay
$validator = Validator::make($request->all(), []);
$validator->sometimes('email', 'unique:users,email', function ($input) {
return $input->email !== Auth::user()->email;
});
//@sujay
Route::name('auth.resend_confirmation')->get('/register/confirm/resend', 'Auth\RegisterController@resendConfirmation');
Route::name('auth.confirm')->get('/register/confirm/{confirmation_code}', 'Auth\RegisterController@confirm');
composer require beyondcode/laravel-confirm-email