- PHP >= 7.4
- BCMath PHP Extension
- Ctype PHP Extension
- Fileinfo PHP extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
Clone from https://github.com/love4php/Challenge_Backend-Engineer.git
git clone https://github.com/love4php/Challenge_Backend-Engineer.git .Run composer install
composer installThe Json file is used as a database and is located at the following address :
./storage/app/db.json- In root directory run :
php artisan serve- Open url [http://127.0.0.1:8000/products] in your browser
- Fitler by category : http://127.0.0.1:8000/products?category={category_name}
- Fitler by price less than : http://127.0.0.1:8000/products?priceLessThan={price}
- Sort product by : http://127.0.0.1:8000/products?sort={sku,category,name,price}
- Pagination : http://127.0.0.1:8000/products?page={1,2,3,...}
To run all tests:
php artisan test