- Accept a list of products and quantities via a `POST` endpoint.
- Validate the request.
- Return the created order with its items and the calculated total.
#### 2. Cancel an Order
- Only `pending` and `confirmed` orders can be cancelled.
#### 3. List Orders
- Return a list of orders for a given customer, including the items in each order and the associated product details.
#### 4. Low Stock Report
- A single endpoint that returns all products where `stock_quantity` is below a configurable threshold (default: `5`).
### Things to note:
- Approach this as production code, not a take-home demo. We pay close attention to the assumptions you make, the failure modes you anticipate, and the trade-offs you choose.
- Each endpoint should respond with consistent, predictable JSON — think about how a frontend or mobile client would consume your API.
- Please provide a README describing how to set up and run the application locally, how to run the test suite, and a brief explanation of the key decisions you made and why.
- Laravel 9+ and PHP 8+ must be used.
## Bonus:
- Add unit/integration tests (Use PhpUnit or Pest testing suite for testing).
Please make sure this project is completed at least one working day before your interview.
The completed project should be submitted by pushing the code to GitHub and a link emailed to HR.