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 install
php artisan migrate
php artisan serve
To register a user, send a POST request to /api/register
with the following parameters:
name
email
password
To login a user, send a POST request to /api/login
with the following parameters:
email
password
The 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.