Install jwt in laravel

Run the following command to pull in the latest version: composer require tymon/jwt-auth

Add service provider ( Laravel 5.4 or below )

Add the service provider to the providers array in the config/app.php config file as follows: "providers" => [ ... Tymon\JWTAuth\Providers\LaravelServiceProvider::class, ] Run the following command to publish the package config file: php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider" Generate secret key I have included a helper command to generate a key for you: php artisan jwt:secret
Deepak Sharma
Asked 21-07-2024
16

Submit your answer