2

I am not able to implement email verification using laravel 8.x and Laravel Jetstream.

As the instructions direct in the Laravel Jetstream documentation, I uncommented the emailVerification feature in config/fortify.php.

Features::emailVerification(),

I implemented the MustVerifyEmail interface in App/Models/User.

use Illuminate\Contracts\Auth\MustVerifyEmail;

I verified that both of these changes actually occurred on the server. I ran php artisan optimize to clear the configuration cache. I verified that Laravel will send an email, by using the lost password functionality, which produced the specified email. I inserted the three routes recommended in the Laravel authentication documentation.

bittids
  • 140
  • 2
  • 5
  • importing/aliasing a class/interface does not mean you are doing anything with it .... did you add the words `implements MustVerifyEmail` to your class declaration? – lagbox Sep 29 '20 at 21:24
  • thanks, I added implements MustVerifyEmail to the class declaration, and everything worked just fine – bittids Sep 29 '20 at 22:20

1 Answers1

15

You forgot to add implements MustVerifyEmail

class User extends Authenticatable implements MustVerifyEmail
  • 1
    This should be added to the documentation. I had the same issue. – Pascut May 17 '21 at 13:44
  • @Pascut Here are the [docs](https://laravel.com/docs/8.x/verification#model-preparation) for email verification. – Pathros Sep 10 '21 at 01:45
  • 1
    I got the same with Laravel 9. Feature enabled, implemented MustVerifyEmail but the field email_verified_at is not set. – Tommy Hoang Jan 11 '23 at 11:01