0
votes

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:

  • The Auth functionality works good, it was installed with php artisan make:auth, and the migrations generated were runned, so this is not the issue.
2
What version of Laravel are you using?Rwd
Laravel Framework 5.5.44John Doe
That's because this functionality was introduced in 5.7.Joe
Oh I understand, it appears this feature was only added in 5.7...John Doe
Out-of-the-box email verification was only added in Laravel 5.7 laravel.com/docs/5.7/releasesRwd

2 Answers

2
votes

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

0
votes

enter image description here

you must upgrade to laravel 5.7 above