Lumen Micro Framework => php artisan key:generate

后端 未结 12 849
遥遥无期
遥遥无期 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:26

    1.Open your terminal setup file:

    vim ~/.zshrc
    

    2.Create an alias for generating random strings:

    # Lumen Key Generate
    alias lumen-key="php -r \"require 'vendor/autoload.php'; echo base64_encode(str_random(32)).PHP_EOL;\""
    

    3.Get a key whenever you need:

    ~/your-lumen-project via 

提交回复
热议问题