找不到“Tymon \ JWTAuth \ Providers \ LaravelServiceProvider”类

I'm using Laravel package Tymon JWT and it was working fine so far. But I tried to install Laravel intervention package and ran Composer update command after which it stopped working and started giving errors as I mentioned.

I've tried all the answers like removing it and reinstalling it back, composer update, install, but still same error and whole project is stopped now.

I've added this in provider's array:

Tymon\JWTAuth\Providers\LaravelServiceProvider::class,

Composer:

"require": {
    "php": ">=5.6.4",
    "barryvdh/laravel-cors": "^0.11.0",
    "irazasyed/jwt-auth-guard": "^1.0",
    "jadjoubran/laravel-angular": "^0.4.0",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0",
    "tymon/jwt-auth": "^0.5.12"
},

What could be the issue?

First, remove the line that you added to the array, then run composer install and then add the code to the array again.

Change to

Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,

in providers array, then in terminal run the following command

php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"