In this project was created a REST API with propose of manager the personal finances of the users using the programming language PHP and Laravel framework to build this API. It's working progress, but you can already to use for tests.
Here is the Trello boards with the features implemented:
- Docker
- PHP 8
- Laravel 8
- Composer 2
- MySQL 8
- PHPStorm or Visual Studio Code
- PHP Best practices (PSR's and Clean Code)
- Clone this repository and after move to the folder:
git clone https://github.com/williamtome/finance-api-v2.git
cd finance-api-v2
- Get up the environment (obs.: you need the Docker installed in your operational system):
vendor/bin/sail up -d
- Install the project and your dependencies:
vendor/bin/sail composer install
-
Copy
.env.example
, paste this file in root folder of project and rename file to.env
-
Generate project key:
vendor/bin/sail artisan key:generate
Endpoint to use the API:
https://quiet-ocean-25469.herokuapp.com/
- You can consume this API with the REST HTTP Client as Postman or Insomnia if you don't have a front-end application.
- Revenues
Verb | Path | Reason |
---|---|---|
GET | /revenue |
Show all the revenues |
GET | /revenue?descricao=xpto |
Show any revenue by description |
POST | /revenue |
Create the revenue |
GET | /revenue/{id} |
Show the specific revenue |
PUT | /revenue/{id} |
Update an revenue |
DELETE | /revenue/{id} |
Delete the revenue |
- Expenses
Verb | Path | Reason |
---|---|---|
GET | /expense |
Show all the expenses |
GET | /expense?descricao=xpto |
Show any expense by description |
POST | /expense |
Create the expense |
GET | /expense/{id} |
Show the specific expense |
PUT | /expense/{id} |
Update an expense |
DELETE | /expense/{id} |
Delete the expense |
vendor/bin/sail artisan test
``
Enjoy it!