A PHP project by dcblogdev
This is a starter project for Laravel API authentication. It includes a user registration and login system.
There are tests for the registration and login.
composer installphp artisan migratephp artisan serveTo register a user, send a POST request to /api/register with the following parameters:
nameemailpasswordTo login a user, send a POST request to /api/login with the following parameters:
emailpasswordThe response will include a token which you can use to authenticate future requests.
To logout a user, send a POST request to /api/logout include the token in the request headers.
After logging out, the token will no longer be valid.
To make an authenticated request, include the token in the request headers.
To run the tests, run php artisan test
This project is open-sourced software licensed under the MIT license.