Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.
A simple Lumen app designed to provide a basic API for our code test.
-
Install PHP (7.2+) or use an environment like Laravel Homestead or Docker (see below)
-
Install composer and run
composer installto install dependencies -
Copy the
.env.examplefile to.envand set a random string forAPP_KEY -
Run
touch database/database.sqliteto create a development database -
Run
php artisan migrateto migrate your development database -
Run
php artisan db:seedto seed your development database -
Run
php -S localhost:3000 -t publicto start up the local development server
You should get JSON output from http://localhost:3000/members
Run vendor/bin/phpunit tests to run the test suite.
As an alternative to installing PHP directly, you can use the Docker files provided by Laradock to run the app and test suite.
When cloning the project, use the
--recurse-submodulesflag to pull down the Laradock submodule
-
cd laradock -
cp .env-example .env -
Change
NGINX_HOST_HTTP_PORTto3000,WORKSPACE_BROWSERSYNC_HOST_PORTto4000andWORKSPACE_BROWSERSYNC_UI_HOST_PORTto4001 -
docker-compose up -d nginx
Note: This could take a few minutes on the initial build
Then connect to the Docker container using docker-compose exec workspace bash to run the setup tasks above.
Documentation for the framework can be found on the Lumen website.
Thank you for considering contributing to Lumen! The contribution guide can be found in the Laravel documentation.
If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Lumen framework is open-sourced software licensed under the MIT license.