This Laravel-based API backend was developed for the purpose of a test conducted by Buckhill for the position of Laravel PHP developer.
The following needs to be specified in the .env before properly running the API server
Please refer .env.example
in the root of the project:
TIMEZONE
- Can be set to a proper timezone value (e.g.Asia/Kabul
)SESSION_MAX_AGE
- This needs to be set to specify the defualt age of a generated token for a user. It can be set to any value acceptable byDateTimeImmutable
(modify
method) such as+1 day
,+6 hour
, etc.
php artisan migrate
php artisan db:seed
After the values on the .env
file have been updated, please run php artisan config:cache
to update the config cache values for the server.
php artisan serve --port 8001
To run Swagger documentation server for this application you need to install npx
and swagger-ui-serve
as npm
dependencies:
-
npm i -g npx
-
npm i swagger-ui-serve
To run the Swagger API server run
npm run swagger
from the project root directory.
You should be guided to a tab opened on your browser on port 3000
.
To execute the tests included with this API please run php artisan test
or
./vendor/bin/phpunit
on the terminal.