How to create APIs in Laravel?
See the first part in api.php and Http/Controllers/Api/UserController
See the second part in api.php and Http/Controllers/Api/UserController
See the third part in api.php and:
- Http/Controllers/Api/RegisterController for registration
- Http/Controllers/Api/SanctumUserController for usage
The base response is in the Http/Traits/BaseApiResponse.php
This demo project uses PHP-JWT: https://github.com/firebase/php-jwt
- JWTAuthController is a JWT Authentication and JWT token generator
- JWTController is a client JWT
This project uses Scribe: https://scribe.knuckles.wtf/laravel
To generate html docs use:
php artisan scribe:generate
and see /docs route