Recipes using API and Laravel
Creating an API for Recipes witn their tags and categories, developing different versions and testing it with laravel telescope
Tech Stack
Server: Laravel, Laravel Telescope
Installation
- Clone this repository.
- Navegate to the project directory
- Run
composer install
to install the dependencies.
- Configure your environment variables.
- Run
php artisan key:generate
to generate an application key.
- Run
php artisan migrate
to create the tables in your database.
- Run
php artisan db:seed
to fill the database with test data.
API Reference
Category
Type |
Path |
Description |
Return |
GET |
/api/v1/categories |
All categories that exist |
id, type, name |
GET |
/api/v1/categories/${id} |
A specific category |
id, type, name, recipes |
Tag
Type |
Path |
Description |
Return |
GET |
/api/v1/tags |
All tags that exist |
id, type, name |
GET |
/api/v1/tags/${id} |
A specific tag |
id, type, name, recipes |
Recipe V1
Type |
Path |
Description |
Return |
GET |
/api/v1/recipes |
All tags that exist |
id, type, attributes |
GET |
/api/v1/recipes/${id} |
A specific tag |
id, type, name, recipes |
POST |
/api/v1/recipes |
Create a new tag |
Same data and confirmation |
PUT |
/api/v1/recipes/${id} |
Update an existed tag only if the same person who created it |
Same data and confirmation |
DELETE |
/api/v1/recipes/${id} |
Delete an existed tag only if the same person who created it |
Same data and confirmation |
Recipe V2
Type |
Path |
Description |
Return |
GET |
/api/v1/recipes |
All tags that exist order Desc |
id, type, attributes |
Links
License
The Laravel framework is open-sourced software licensed under the MIT license.