Generating application key in Lumen

2024-03-04 05:24:32 Satyam Laravel

Lumen generate key

To generate application key in Lumen, please add your routes/web.php and point your domain to /key and copy the output string and paste it in your .env file

$app->get('/key', function() {
    return str_random(32);
In Lumen 5.5 or Above
$router->get('/key', function() {
    return str_random(32);



This post is submitted by one of our members. You may submit a new post here.

Related Tricks