This contains a sample REST API for scheduling. It uses the Spark framework and is a PSR-7 compliant Action-Domain-Responder (ADR) system. It's also PSR-1, PSR-2, and PSR-4 compliant.
You will need Composer to get setup.
composer install
Migrations are handled using Phinx.
php vendor/bin/phinx migrate -e development
This will install a SQLite database.
Confirm the installation by changing into the project directory and starting the built-in PHP web server:
cd spark-project
php -S localhost:8000 -t web/
You can then browse to http://localhost:8000/shifts and see JSON output:
{"shifts": []}
You can also browse to http://localhost:8000/shifts?user_id=1 and see modified JSON output:
{"meta": {}, "shifts": []}