This is a super simple api that has a get request which returns 5 quiz questions with answer options, correct answer index, and wrong answer help.
This uses Lumen and MySQL for a backend. So you'll want to make sure MySQL is installed along with Composer.
- Set your database credentials in
.env
file - Run
php artisan migrate
to insert the table in your db. - Run
php artisan db:seed
to populate the table with 5 questions. - Run
php -S localhost:8001 -t public
to start the server locally. - Curl (or us Postman) call a GET request to
http://localhost:8001/api/questions/
To run the basic tests, go to the project root directory and run ./vendor/bin/phpunit
.