1
votes

I am getting error

Class 'Tymon\JWTAuth\Providers\LaravelServiceProvider' not found

what i did to solve :-

  1. install "tymon/jwt-auth": "1.0.0-beta.3"

  2. then update the alias 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,

  3. set provider to Tymon\JWTAuth\Providers\LaravelServiceProvider::class, but still getting error:

Class 'Tymon\JWTAuth\Providers\LaravelServiceProvider' not found when usiing laravel 5.5

But still not working.

So what i need to do? Please help me out?

2

2 Answers

1
votes

A little old, but I thought I'd chime in. I was having the exact same problem the other day. I kept trying to run a migration and I would get a similar error. I swear I tried everything found in this post, but it didn't work. I managed to fix my issue by running these commands:

composer update (to make sure I had the latest packages), and composer install

Then, I ran my migration. No errors after that. Funny thing is, I swear I did all this before. Maybe I did it in the wrong order. Hope this helps.

0
votes

Had the same issue, composer dump-autoload came to the rescue