1
2LARAVEL 8 : ENABLE EMAIL VERIFICATION FOR REGISTRATION
3-------------------------------------------------------
4
5(1) Modify the Verification controller found in
6app > Http > Controllers > Auth > VerificationController
7
8*Update below class;
9
10FROM :
11
12Class User Extends Authenticatable
13{
14...
15}
16
17TO :
18
19Class User Extends Authenticatable implements MustVerifyEmail
20{
21...
22}
23
24
25(2) Add the below code in the web.php route file;
26Auth::routes(['verify' => true]);
27
28
29(3) Add the below code in the Middleware section of your Controllers
30$this->middleware(['auth', 'verified']);
31
32Thats all, the next registration will require an email confirmation
33
34