- Clone project via SSH
git@github.com:MaryKal/test-shop.git - Run
composer install - Run
./vendor/bin/sail up - Run
php artisan project:setup - Copy access token from console
Access token available only once. If you want to obtain another token, run
php artisan project:setupagain (all database data will be wiped!), or use api/login route (description below)
Note: Each request should have
Accept: application/jsonheaderNote: Each auth request should have
Authorization: Bearer <token>header
Endpoint: http://127.0.0.1/api/login
Method: POST
Body:
email: test@example.com
password: password
Endpoint: http://127.0.0.1/api/products
Method: GET
Endpoint: http://127.0.0.1/api/baskets
Method: GET
Endpoint: http://127.0.0.1/api/basket-products
Method: POST
Body:
code: B01
Endpoint: http://127.0.0.1/api/basket-products/{basket_product_id}
Method: DELETE