Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not exist

Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not exist

In this post we will give you information about Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not exist. Hear we will give you detail about Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not existAnd how to use it also give you demo for it if it is necessary.

Today, we are install laravel 5.5 and install tymon/jwt-auth package in my laravel 5.5 application. and we are set service providers and aliases also. but when we are try to generate jwt key run by following command.




php artisan jwt:generate



After run above command you can face following error message in terminal.



[ReflectionException]
Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not exist


Then we are search on google then i was realize in laravel 5.5 it was some changes in package configuration. and here i have share solution for it.


Solution


Please, install new dev version of tymon/jwt-auth package. this issue resolve in dev package development. so, again run following command for install dev version package.




composer require tymon/jwt-auth:dev-develop --prefer-source




After install dev version package open your config/app.php file and replace old service provider to new like that.




'providers' => [
    ....
    TymonJWTAuthProvidersJWTAuthServiceProvider::class to 
    TymonJWTAuthProvidersLaravelServiceProvider::class
],
 


After replace service provider then now run following command for generate jwt key



 
php artisan jwt:secret



This solution is fine work for me. so, we are also share with you.

Hope this and post will helped you for implement Method TymonJWTAuthCommandsJWTGenerateCommand::handle() does not exist. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  3  =  7

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US