Install the package via composer:
composer require little-apps/littlejwt
Publish the config file with:
php artisan vendor:publish --tag="littlejwt-config"
Generate a secret phrase for building and validating JWTs:
php artisan littlejwt:phrase
See JSON Web Keys (JWKs) for generating other types of keys.
You will see the terms "token" and "JWT" mentioned in this document. The difference between the two is:
Besides the examples included in this documentation, there are various test cases on GitHub that can be used as examples for working with LittleJWT.