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

m_beer's avatar

lumen and config

Hello guys,

I am struggling to access the config in lumen.

I have created a folder "config" in the root_dir of my app. I return a dummy value there in config/app.php

return ['dummy' => 'test'];

In boostrap/app.php, the following is uncommented

$app->configure('app');

In a Controller, i try to access it:

$dummy = config('app.dummy')

but dummy is always null.

What am I missing?

0 likes
1 reply
m_beer's avatar
m_beer
OP
Best Answer
Level 6

For future references:

I failed to put it in the correct directory.

I placed it under project/app/config, it should have been /project/config.

=> it has to be the root directory of the project, not of the "app" folder inside the project

Please or to participate in this conversation.