Before you begin, ensure you have met the following requirements:
PHP >= 8.0
Composer
Laravel
git clone https://github.com/yogendrakinja/gravityer.git
cd gravityer
composer install
cp .env.example .env
php artisan key:generate
php artisan serve
Call the api endpoint
POST /api/discount HTTP/1.1 Host: 127.0.0.1:8000 Content-Type: application/json Content-Length: 74 { "prices" : [5, 5, 10, 20, 30, 40, 50, 50, 50, 60], "rule":3 // 1 = rule1, 2= rule2, 3= rule3 }