Jwt-auth: jwt:generate broken!

Created on 20 Dec 2017  路  4Comments  路  Source: tymondesigns/jwt-auth

php artisan jwt:generate - is broken!

php artisan jwt:generate

In BoundMethod.php line 135:

  Method Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist

Most helpful comment

This is because the command class adheres to the Laravel 4 command interface, which uses a fire() method instead of handle(). As a quick and dirty fix you can add the following to Tymon\JWTAuth\Commands\JWTGenerateCommand:

// JWTGenerateCommand.php

public function handle()
{
    $this->fire();
}

Alternatively, the issue is fixed in the development version so you could pull in that version and use the new docs. No idea how stable the dev version is at the moment.

All 4 comments

me too

This is because the command class adheres to the Laravel 4 command interface, which uses a fire() method instead of handle(). As a quick and dirty fix you can add the following to Tymon\JWTAuth\Commands\JWTGenerateCommand:

// JWTGenerateCommand.php

public function handle()
{
    $this->fire();
}

Alternatively, the issue is fixed in the development version so you could pull in that version and use the new docs. No idea how stable the dev version is at the moment.

Since we are doing dirty hacks you can also just change the method fire() to handle() within \vendor\tymon\jwt-auth\src\Commands\JWTGenerateCommand.php

Yes I'm aware of this.. version 0.5.* doesn't have full support for Laravel 5.5. You would need to use the newer release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agneshoving picture agneshoving  路  3Comments

loic-lopez picture loic-lopez  路  3Comments

CBR09 picture CBR09  路  3Comments

phamduong picture phamduong  路  3Comments

gamelife1314 picture gamelife1314  路  3Comments