Simple Laravel REST API project with Test-Driven Development
- Run the command below to install:
composer install
- Copy
.env
file
cp .env.example .env
- In file
.env
set database
...
DB_DATABASE=db_name
DB_USERNAME=db_username
DB_PASSWORD=db_password
...
- Migrate database
php artisan migrate
- Set encryption key
php artisan key:generate
- Install passport
php artisan passport:install
- Generate API documentation
php artisan l5-swagger:generate
- Run the command below to start the server:
php artisan serve --host=127.0.0.1 --port=8000
- Visit this page http://127.0.0.1:8000/api/documentation to access the API Documentation
Run the commands below:
./vendor/bin/phpunit tests/Feature/AuthTest.php
./vendor/bin/phpunit tests/Feature/ItemTest.php
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.