Open mohamed-atef opened 6 years ago
Hi, I can confirm this error. Having the same issue then running php artisan jwt:generate
@psychonetic @mohamed-atef with laravel 5.5 you use the command php artisan jwt:secret
and better use version 1.0.0 of this package
@nivanmorgan I thought I had version 1.0* installed, but when installing it like provided in the new documentation composer require tymon/jwt-auth
it still installs the old version (yeah, I know it's an unfinished documetation, but writing such basic things does not take a whole day).
And yes when using version 1.0.0-rc2 php artisan jwt:secret
works as expected. Thank you!
Laravel 5.5 renamed the fire
function to handle
. A temporary rename in the vendor folder made this work, but perhaps a PR is in order that checks the laravel version and uses the appropriate function.
Exception while generating the secret key
While executing the command
php artisan jwt:generate
an exception has been thrown that method handle doesn't exist in JWTGenerateCommand classMethod Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist
.The solution was to change the name of the method "fire" in the same class to "handle" and it worked just fine.
Your environment
Steps to reproduce
install the package and try to generate the secret.
Expected behaviour
Generating the secret code
Actual behaviour
Throw an exception