Lumen Micro Framework => php artisan key:generate

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

    The Laravel command is fairly simple. It just generates a random 32 character long string. You can do the same in Lumen. Just temporarily add a route like this:

    $router->get('/key', function() {
        return \Illuminate\Support\Str::random(32);
    });
    

    Then go to /key in your browser and copy paste the key into your .env file.
    Afterwards remove the route.

    Obviously you could also use some random string generator online. Like this one

提交回复
热议问题