Answers for "Route [verification.notice] not defined."

0

Route [verification.notice] not defined.

Add verify inside the auth routes and other routes where you want only verified
users can access addded 'verified' middleware and inside the User implement
MustVerifyEmail class.

#### Inside routes\web.php

Auth::routes(['verify' => true]);

Route::group(['middleware' => ['auth', 'verified']], function() {
	.....
});

#### Inside App\Models\User.php

class User extends Authenticatable implements MustVerifyEmail
{
    use HasFactory, Notifiable, HasApiTokens, HasRoles;
    
    ...
}
Posted by: Guest on May-13-2021

Browse Popular Code Answers by Language