Reputation: 1323
I have a problem getting value from config/app.php
in Laravel 5.5
I added a custom line:
'test' => '12345',
Then I try to get it in my controller like this:
config(app.test);
and it returns nothing but when I try to get config(app.locale);
It returns en
What I'm doing wrong? Are there any commands that I have to run after editing the config file?
Upvotes: 0
Views: 1010
Reputation: 127
Try this,In laravel you can add custom value in config/constants.php eg:- "test" => "1234", you can access by this, Config::get('constants.test');
Upvotes: 0