Lumen Micro Framework => php artisan key:generate

后端 未结 12 1136
遥遥无期
遥遥无期 2021-01-30 00:59

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

12条回答
  •  清歌不尽
    2021-01-30 01:10

    An easy solution is just running PHP code from the terminal (without using tinker, because that is not available with Lumen):

    php -r "require 'vendor/autoload.php'; echo str_random(32).PHP_EOL;"
    

    It uses Laravel's Str::random() function that makes use of the secure random_bytes() function.

提交回复
热议问题