requires PHP 8.0
git clone https://github.com/cpajuelodeveloper/bingo-backend-lumen-laravel.git
mv env.example .env
composer install
./vendor/bin/phpunit
php -S localhost:3000 -t public
Go to the browser and open localhost:3000 and complete with the following urls.
- Response 200 (application/json)
{ "cardNumber": 1, "card": [ [ 11, 15, 4, 2, 1 ], [ 18, 20, 23, 25, 30 ], [ 35, 44, "FREE", 38, 43 ], [ 56, 60, 49, 48, 52 ], [ 68, 64, 73, 74, 75 ] ] }
- Response 200 (application/json)
{ "call": 20, "calls": [ 44, 28, 31, 14, 73, 70, 54, 20 ] }
- Response 200 (application/json)
{ "cardNumber": 1, "winner": true, "options": [[14,5,9,3,11],[17,16,24,19,26],[37,31,"FREE",39,36],[49,53,57,48,58],[68,71,61,66,69]] } //error response { "error": "card not set"}
- Response 200 (application/json)
[{ "cardNumber": 1, "winner": true, "options": [[14,5,9,3,11],[17,16,24,19,26],[37,31,"FREE",39,36],[49,53,57,48,58],[68,71,61,66,69]] }, { "cardNumber": 2, "winner": true, "options": [[14,5,9,3,11],[17,16,24,19,26],[37,31,"FREE",39,36],[49,53,57,48,58],[68,71,61,66,69]] }] //errors response { "error": "cards not set"}
- Response 200 (application/json)
{ "success": true, "message": "game reset" } //errors response { "success": false, "message": "game already reset" }