https://github.com/jamison0902/php-laravel-api
API using Laravel and PostgreSQL
https://github.com/jamison0902/php-laravel-api
api-rest docker laravel10 php8 postgresql
Last synced: 3 months ago
JSON representation
API using Laravel and PostgreSQL
- Host: GitHub
- URL: https://github.com/jamison0902/php-laravel-api
- Owner: jamison0902
- Created: 2024-12-06T01:22:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-08T21:07:38.000Z (over 1 year ago)
- Last Synced: 2025-01-03T12:19:16.470Z (over 1 year ago)
- Topics: api-rest, docker, laravel10, php8, postgresql
- Language: PHP
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
This project aims to provide an API in Laravel to perform user registration, allowing a frontend (such as Vue.js, React, or other) to interact with the application to register, view, edit and delete users. The API will be ready to be consumed in web or mobile systems.
## Resources
- PHP 8.1 programming language;
- Laravel Framework 10.48.25
- PostgreSQL 15.4 Open Source Database;
- Docker Desktop 4.36.0;
- Postman Version 11.21.0;
## Guidance
- The **cadastro.sql** file contains a copy of the database used.
- The **docker-compose.yml** file contains a configuration to create a container in docker, you need to change the location of the project in this line of code **C:/laravel:/app** replacing C:/laravel with a location of your preference where the project is located.
## Endpoint Users
- GET /users: Lists all users.
- GET /users/{id}: Displays a specific user.
- POST /users: Creates a new user.
- PUT /users/{id}: Updates an existing user.
- DELETE /users/{id}: Deletes a user.
## Endpoints Users Screen
|  |  |  |  |  |
|---|---|---|---|---|
## Endpoint Endereco
- GET /endereco: Lists all address.
- POST /endereco: Creates a new address.
- GET /endereco/{id}: Displays a specific address.
- PUT /endereco/{id}: Updates an existing address.
- DELETE /endereco/{id}: Deletes an address.
## Endpoints Endereco Screen
|  |  |  |  |  |
|---|---|---|---|---|
## Endpoint Endereco Unlinked
- GET /endereco: Lists all address unlinked.
## Endpoints Endereco Unlinked Screen
|  |
|---|
## Starting the application
Before you begin, make sure you have docker installed and configured correctly on your machine. Change the path of your project folder in **docker-compose.yml** and follow the step below:
1. Open the terminal and navigate to the directory where the project files were saved.
2. Run the command below to starting the application.
```
docker-compose up
```