Laravel configuration files per environment

You can define configurations per environment
1. Set the environment in apache: SetEnv LARAVEL_ENV local
2. I defined an override application.php in /application/config/local and dev, test and prod
Then I can access as follows:
$myConfigValue = Config::get('application.myConfigValue');

Then pass to view as follows

return View::make('home.index')->bind("myConfigValue", $myConfigValue);


Here's what the config files looks like in /application/config/local


return array(
// Url for local
'url' => 'http://localhost',
'myConfigValue' =>  'yesDoIt'
);

Of course, see the laravel documentation for all this and more.

Comments

Popular posts from this blog

deep dive into Material UI TextField built by mui

angular js protractor e2e cheatsheet

react-router v6.4+ loaders, actions, forms and more