Answers for "laravel 8 register with email verification"

PHP
3

laravel 8 register with email verification

LARAVEL 8 : ENABLE EMAIL VERIFICATION FOR REGISTRATION
-------------------------------------------------------
  
(1) Modify the Verification controller found in
app > Http > Controllers > Auth > VerificationController

*Update below class;

FROM :

Class User Extends Authenticatable
{
...
}

TO :

Class User Extends Authenticatable implements MustVerifyEmail
{
...
}


(2) Add the below code in the web.php route file;
Auth::routes(['verify' => true]);


(3) Add the below code in the Middleware section of your Controllers
$this->middleware(['auth', 'verified']);

Thats all, the next registration will require an email confirmation
Posted by: Guest on July-24-2021

Code answers related to "laravel 8 register with email verification"

Browse Popular Code Answers by Language