Trait “Laravel\Passport\HasApiTokens” not found

Posted by

Error:

Symfony \ Component \ ErrorHandler \ Error \ FatalError  Trait "Laravel\Passport\HasApiTokens" not found

Solution:

I have faced the same issue and it was resolved by doing the following:

Do you have a composer? Install that first. Then you need Laravel Passport.

Step 1:

php artisan key:generate

Step 2:

Run composer require laravel/passport

Step 3:

Run php artisan passport:install from command line

Step 4:

Add add the Laravel\Passport\HasApiTokens trait to your App\User model.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x