| */ ini_set('display_errors', 'On'); /* |-------------------------------------------------------------------------- | Laravel Configuration Loader |-------------------------------------------------------------------------- | | The Laravel configuration loader is responsible for returning an array | of configuration options for a given bundle and file. By default, we | use the files provided with Laravel; however, you are free to use | your own storage mechanism for configuration arrays. | */ Laravel\Event::listen(Laravel\Config::loader, function ($bundle, $file) { return Laravel\Config::file($bundle, $file); }); /* |-------------------------------------------------------------------------- | Register Class Aliases |-------------------------------------------------------------------------- | | Aliases allow you to use classes without always specifying their fully | namespaced path. This is convenient for working with any library that | makes a heavy use of namespace for class organization. Here we will | simply register the configured class aliases. | */ $aliases = Laravel\Config::get('application.aliases'); Laravel\Autoloader::$aliases = $aliases; /*
| PHP Display Errors Configuration |-------------------------------------------------------------------------- | | Since Laravel intercepts and displays all errors with a detailed stack | trace, we can turn off the display_errors ini directive. However, you | may want to enable this option if you ever run into a dreaded white | screen of death, as it can provide some clues. | */ ini_set('display_errors', 'On'); $config_app = (require path('public') . 'config.app.php'); Laravel\Event::listen(Laravel\Config::loader, function ($bundle, $file) use($config_app) { if ($bundle !== 'application') { return Laravel\Config::file($bundle, $file); } $load = Laravel\Config::file($bundle, $file); switch ($file) { case 'application': $config = array('url' => isset($config_app['url']) ? $config_app['url'] : '', 'timezone' => $config_app['timezone'], 'key' => $config_app['key'], 'index' => !$config_app['mod_rewrite'] ? 'index.php' : '', 'mail' => $config_app['mail']); $load = $config + $load; break; case 'database': $config['connections'][$config_app['database']['driver']] = array('host' => $config_app['database']['host'], 'database' => $config_app['database']['database'], 'username' => $config_app['database']['username'], 'password' => $config_app['database']['password'], 'charset' => 'utf8', 'prefix' => '', 'driver' => $config_app['database']['driver']); $config['default'] = $config_app['database']['driver']; $load = $config + $load; break; } return $load; }); /* |--------------------------------------------------------------------------