Application made with Laravel 10 that consists of the creation of a CRUD of a games api that contains the following functionalities:
< 8000 ul dir="auto">https://laravel-api-server.up.railway.app
http://laravel-api-server.up.railway.app/api/documentation
https://github.com/JAVI-CC/Laravel-API-Client
https://github.com/JAVI-CC/VUE3-API-client
Key | Value |
---|---|
Authorization | {Token provided by Sanctum} |
Accept | application/json |
Content-Type | application/json |
$ composer install && php artisan key:generate && php artisan migrate --seed
Method | Path | Description | Auth |
---|---|---|---|
GET | /api/juegos | Get all the games | No |
POST | /api/juegos/ | Add a game | Yes |
GET | /api/juegos/{slug} | Get a game | No |
POST | /api/juegos/edit | Update a game | Yes |
DELETE | /api/juegos/delete/{slug} | Delete a game | Yes |
POST | /api/juegos/filter/search | Search games | No |
GET | /api/juegos/desarrolladoras/{slug} | Get games from a developer | No |
GET | /api/juegos/desarrolladoras/show/all | Get list all developers | No |
GET | /api/juegos/generos/{slug} | Get games from a genere | No |
GET | /api/juegos/generos/show/all | Get list all generes | No |
GET | /api/juegos/paginate | Get paginate games | No |
GET | /api/juegos/random | Get random games | No |
Method | Path | Description | Auth |
---|---|---|---|
POST | /api/auth/register | Register a user | No |
POST | /api/auth/login | Login a user | No |
GET | /api/auth/userinfo | To view a user information | Yes |
GET | /api/auth/check | Check if user authenticated | No |
POST | /api/auth/logout | Log out a user | Yes |
DELETE | /api/auth/delete | Delete user authenticated | Yes |
1. In your Pusher account create a channel called: juegos-api
2. Enter the file: .env
3. fill in the following credentials:
PUSHER_APP_ID={App Keys in the channel juegos-api app_id}
PUSHER_APP_KEY={App Keys in the channel juegos-api key}
PUSHER_APP_SECRET={App Keys in the channel juegos-api secret}
PUSHER_APP_CLUSTER={App Keys in the channel juegos-api cluster}
- nginx:alpine -
:8000->80/tcp
- mariadb:latest -
:3306
- php:8.0.6-fpm -
:9000
├── laravel-api-server-app ├── laravel-api-server-web └── laravel-api-server-db
$ git clone https://github.com/JAVI-CC/Laravel-API-Server.git
$ cd Laravel-API-Server
$ cp .env.example .env
$ docker-compose up -d
$ docker-compose exec --user=root app chmod -R 777 /var/www/
$ docker-compose exec app composer install
$ docker-compose exec app php artisan key:generate
$ docker-compose exec app php artisan migrate --seed
Once you have the containers deployed, you can access the API at http://localhost:8000