0
votes

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?

2
have you tried to move scripts from pre-install-cmd to post-install-cmd in the composer instructions?Alex Slipknot
@AlexSlipknot what'll it do? and how to add in composer?Umair Malik
pre-install-cmd: occurs before the install command is executed with a lock file present pre-update-cmd: occurs before the update command is executed, or before the install command is executed without a lock file present. getcomposer.org/doc/articles/scripts.mdAlex Slipknot
@AlexSlipknot no it didn't worked. Still same error. It was working fine till today. I just installed Laravel intervention package and run composer update command after that it stopped everything.Umair Malik

2 Answers

0
votes

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

0
votes

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"