John Doe
John Doe

Reputation: 601

Laravel MustVerifyEmail doesn't exist?

I am developing a web application using laravel.

I want to implement email verification via https://laravel.com/docs/5.7/verification

I modified my User model to use MustVerifyEmail interface:

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;

use App\SecurityQustion;

class User extends Authenticatable implements MustVerifyEmail
{
    use Notifiable;

And I am getting the following error:

Interface 'Illuminate\Contracts\Auth\MustVerifyEmail' not found

I verified in my vendor/laravel.../Auth/ folder and the file itself doesn't appear to be there.


To be noted:

Upvotes: 0

Views: 3302

Answers (2)

Rahman Rezaee
Rahman Rezaee

Reputation: 2165

enter image description here

you must upgrade to laravel 5.7 above

Upvotes: 0

Vipertecpro
Vipertecpro

Reputation: 3284

Solution: Upgrade your laravel project to use latest features, Here is how you can upgrade laravel project :-

Change this line in composer.json to upgrade,

"laravel/framework": "5.7.*",

Please take a backup before upgrading it to newer version (Safety measures)

Ref. https://laravel.com/docs/5.7/releases#laravel-5.7

Upvotes: 2

Related Questions