I\'m trying out the PHP micro Framework Lumen (from Laravel).
One of my first steps was to look into the .env.example
file and make a copy of it to have my
Firstly, you have to register your key generator command, put this Lumen Key Generator Commands to app/Console/Commands/KeyGenerateCommand.php
. To make this command available in artisan
, change app\Console\Kernel.php
:
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'App\Console\Commands\KeyGenerateCommand',
];
After that, configure your application so that Illuminate\Config\Repository
instance has app.key
value. To do this, change bootstrap/app.php
:
configure('app');
After that, copy your .env.example
file to .env
:
cp .env.example .env
Ignore this step if you already use
.env
file.
Enjoy you key:generate
command via:
php artisan key:generate
You may use Lumen Generator. It covers so much commands you are missing from Laravel.