/Laravel_Buenas_Practivas_API

An API for Recipes witn their tags and categories, developing different versions and testing it with laravel telescope

Primary LanguagePHPMIT LicenseMIT

Logo

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

  1. Clone this repository.
  2. Navegate to the project directory
  3. Run composer install to install the dependencies.
  4. Configure your environment variables.
  5. Run php artisan key:generate to generate an application key.
  6. Run php artisan migrate to create the tables in your database.
  7. 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

portfolio linkedin

License

The Laravel framework is open-sourced software licensed under the MIT license.