Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GilbertLangriala's avatar

Lumen environments definition

I have used Lumen (Laravel based framework) to design my API.

I must manage two environments (production, local). I tried to put these lines in my bootstrap/app.php file :

$env = $app->detectEnvironment(array( 'local' => array('my-system'), 'production' => array('prod-system'), )); But, when I try to execute php artisan serve it gives me the following error :

Call to undefined method Laravel\Lumen\Application::detectEnvironment() How can I define my environments in Lumen ?

0 likes
0 replies

Please or to participate in this conversation.