E
E
EvgMul2018-10-08 20:50:38
Yii
EvgMul, 2018-10-08 20:50:38

How to access a property in the application's config?

Hello. Can you please tell me if I specify in the config.php of the application Can I somehow get the value of 'var' in the application? Thanks in advance to all who respond.
'sendPusle' => ['var' => 'value']

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-10-08
@EvgMul

In general, there are params
in the config for this:

$config = [
    // …
    'params' => [
        'sendPusle' => ['var' => 'value']
    ],
];

What does it have to do with it out of the box and put it in a separate params.php file,
but of course you can, but in fact params is implemented that way and it is for such things

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question