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.
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
[ADDCODE]
After install dev version package open your config/app.php file and replace old service provider to new like that.
'providers' => [
....
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class to
Tymon\JWTAuth\Providers\LaravelServiceProvider::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.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to Generate Random Number in PHP
When you need to save multiple files in...Laravel 8 Cron Job Task Scheduling Tutorial
When running web application, often we n...How to create a string by joining the values of an array in PHP
Use the PHP implode() or ...How to extract substring from a string in PHP
Use the PHP substr() function...PHP Parse and Process XML data
Sometimes working with 3rd party API, yo...