ZA
zambelz48/lumen-rest-sample
Sample rest api using laravel lumen framework
About
Sample REST API using laravel lumen micro-framework.
Setup
Install dependencies
Run command composer install
Configuration
- Rename
.env.sampleinto.env, and configure the proper configuration value, especially for the database configuration. - Create a database with the same name as declared in
.envfile before. - Run command
php artisan migrateto create database tables.
Run the application
Run command php -S <HOST>:<PORT> -t public (HOST and PORT should match with the given value in .env file)
Unit test
Configuration
- Open
phpunit.xmlfile and set the database name atDB_DATABASEenv key. - Create a database with the same name as the given value in
phpunit.xml.
Run the test
Run the command ./vendor/bin/phpunit tests/ProductControllerTests
On this page
Contributors
Created June 23, 2019
Updated June 24, 2019