Unable to read new configuration variables in laravel 5.4

I added a new configuration variable to a file config/app.phpin laravel like this

'foo' => 'pass'

but when I tried to read it using config('app.foo'), I keep getting null, while other variables return the correct values. What do I need to do?

+4
source share
1 answer

The syntax you are using is correct, try clearing the cache with this command:

php artisan config:clear
+6
source

Source: https://habr.com/ru/post/1675150/


All Articles