📘 Disponible también en Español
Upgraded app to Laravel 12 and added new features, including tests.
This application has been developed with Laravel, it offers CRUD operations and a basic authentication and registration system.
-
API
-
Test
-
CRUD
-
MySQl
-
Postman or Bruno
-
Visual Studio Code
-
Clone this repository to your local machine using
git clone https://github.com/nuriadevs/basic-app-laravel-12-sanctum-backend
. -
Install PHP dependencies using Composer with
composer install
. -
Copy the
.env.example
configuration file and set it up with your environment and.env
file. -
Generate an application key with
php artisan key:generate
. -
Configure your database in the
.env
file. -
Run migrations with
php artisan migrate
. -
Run seeds for data with
php artisan db:seed
. -
Start the development server with
php artisan serve
. -
Access the application in your web browser at http://localhost:8000.
Endpoint | Methods | Routes |
---|---|---|
Authentication | ||
Login | POST | api/auth/login |
Register | POST | api/auth/register |
Logout | POST | api/auth/logout |
Users | ||
Index | GET | api/users |
Show | GET | api/users/{user} |
Store | POST | api/users |
Update | PATCH | api/users/{user} |
Destroy | DELETE | api/users/{user} |
Products | ||
Index | GET | api/products |
Show | GET | api/products/{product} |
Store | POST | api/products |
Update | PATCH | api/products/{product} |
Destroy | DELETE | api/products/{product} |
Orders | ||
Index | GET | api/orders |
Show | GET | api/orders/{order} |
Store | POST | api/orders |
Update | PATCH | api/orders/{order} |
Destroy | DELETE | api/orders/{order} |
Visit .env.example
to create the environments.
You can watch the test in Postman of the restful API on this link Wath video
- Don't forget to create your own .env file for the variables.
- You can create your own data without running the seeder.
- This project is under construction...can be improved.
Thank you very much for reading this project.