- Copy .env.example to .env
cp .env.example .env
, then change default values. For getting UID and GID, run the following commands.
id -u #UID
id -g #GID
-
Copy src/.env.example to src/.env
cp src/.env.example src/.env
(you can change default values) -
Run this command to install the dependencies:
docker-compose run --user=$(id -u) --rm app composer install
- Generate the key:
docker-compose run --user=$(id -u) --rm app php artisan key:generate
- Run migrations:
docker-compose run --user=$(id -u) --rm app php artisan migration --seed
- Use the following command to launch the project:
docker-compose up --build -d
- category:
/api/v1/products?category=insurance
- price:
/api/v1/products?price=99000
- price range:
/api/v1/products?price_range[min]=10000&price_range[max]=90000
- pagination:
/api/v1/products?page=1&per_page=12
NOTE: Use Accept:application/json
header if you want see errors and so on