This task has one api that display all products in inventory applying filter on them by hit this get url:
- product_name to search about all products that their name contain its value 'not case-sensitive'.
- vendor_name to search about all products that their vendor name contain its value 'not case-sensitive'.
- min_price to search about all products that their price greater than or equal its value.
- max_price to search about all products that their price less than or equal its value.
- sort_by (which accept only: 'selling' or 'price' or 'votes') to sort products by most selling, or lowest price, or most voted according to its value.
** NOTE : All Filters are Optional.
- A : clone project in any directory .
- B : Go inside cloned project and run command "composer install" in terminal.
- C : Rename .env.example to .env
- D : Run command "php artisan key:generate" in terminal.
- E : Make sure to add project absolute-path inside .env in key : DB_DATABASE.
- F : Run command "php artisan serve".
This project include test cases for filter criteria, you can run all of them by run command:
"php artisan test"