This is an implementation of Laravel Rest API Authentication Using JWT. A blog about this can be found here: Laravel Rest API Authentication Using JWT Tutorial | Fajarwz.
composer install
cp .env.example .env
php artisan key:generate
- Create a database and connect it with Laravel with filling the DB name in
DB_DATABASE
- Adjust
DB_USERNAME
- Adjut
DB_PASSWORD
php artisan migrate
php artisan vendor:publish --provider="PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider"
php artisan jwt:secret
This will update your .env
file with something like JWT_SECRET=foobar
php artisan serve