If you are working with laravel jwt auth then may you face this error 'Tymon\JWTAuth\Providers\LaravelServiceProvider' not found. In this example, i will show you that how you can solve this error.
There is some problem while downloading the package with latest laravel version. So i am here to help you, that how to solve command "jwt:generate" is not defined. From this tutorial you will able to generate jwt secret key without error.
First un below command:
composer require tymon/jwt-auth:dev-develop --prefer-source
and in your config/app.php make providers as
Also provide the Aliases as:
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
After all the above steps publish our vendor:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"
And generate auth secret :
php artisan jwt:secret
Hope it can help you.
#laravel #laravel-8x #jwt #tymondesignsjwt-auth