Laravel Get Config Variable
You need to change it to:
@foreach (Config::get('app.languages') as $lang => $language)
.
Treat the first segment of your lookup as the files under /config
, in this case app.php
corresponds to Config::get('app.*')
If it wasn't obvious, you can use the helper function config()
rather than Config::get()
as well.
Laravel has a helper function for config which allows you to avoid instantiating a Config
instance each time you access a value.
Simply use:
config('app.languages');