To the point
Installation and Running Lumen - LaravelLumen is micro-framework by Laravel
Installation
1. Server Requirements
- PHP >= 5.5.9
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
2. Installing Lumen
Installing Lumen with Composer to manage its dependencies. Make sure you have Composer installed on your machine.
Via Lumen installer
Download Lumen installer via composer
$ composer global require "laravel/lumen-installer"
And then method of installation is much faster than installing via Composer:
$ lumen new name_your_project
Via Composer Create Project
Using the Composer create-project
command in your terminal
$ composer create-project --prefer-dist laravel/lumen
name_your_project
3. Configuration
All of the configuration options for the Lumen framework are stored in the .env
file. Once Lumen is installed, you should also configure your local environment.
Application Key
The next thing you should do after installing Lumen is set your application key to a random string. Typically, this string should be 32 characters long. The key can be set in the .env
environment file. If you have not renamed the .env.example
file to .env
, you should do that now. If the application key is not set, your user encrypted data will not be secure!
4. Running after installing Lumen
Configuration
Copy paste your .env.example, like this.
[caption id="attachment_409" align="aligncenter" width="302"]

env-lumen-laravel[/caption]
running first your lumen on browser.
http://localhost/lumen/public
or
- If you using windows, Open command Prompt or terminal if unix.
- Navigate to your project directory.
- execute this command: "php -S localhost:80 -t ./public".
- Open your borwser and visit http://localhost:port.
Thnk : Iginla Omotayo
if you got error, edited file index.php in folder public. Change
$app->run();
to
$app->run($app->make('request'));
if works, you will get output on you browser like this.
Lumen (5.2.7) (Laravel Components 5.2.*)
Add key application lumen on file .env
Edit file routes.php in folder Controllers and change, like this ( it`s up to u )
$app->get('/', function () use ($app) {
return $app->version();
});
$app->get('/key', function () use ($app) {
return str_random(32);
});
Ref :
Lumen LaravelOk done. thank you. :lol: :lol: