简体   繁体   中英

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

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?

首先,删除添加到阵列的行,然后运行composer install,然后将代码再次添加到阵列。

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM