From e44ba8456130fcd0a282ea91b5736d903f8c0496 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 16 Jan 2018 19:56:05 +0100 Subject: Refactoring: moved application bootstrapping to bootstrap.php --- includes/application.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 includes/application.php (limited to 'includes/application.php') diff --git a/includes/application.php b/includes/application.php new file mode 100644 index 00000000..418dd08d --- /dev/null +++ b/includes/application.php @@ -0,0 +1,37 @@ +make(Config::class); +$appConfig->set(require config_path('app.php')); +$app->bootstrap($appConfig); + + +/** + * Configure application + */ +date_default_timezone_set($app->get('config')->get('timezone')); + +if (config('environment') == 'development') { + $errorHandler = $app->get('error.handler'); + $errorHandler->setEnvironment(Handler::ENV_DEVELOPMENT); + $app->bind(HandlerInterface::class, 'error.handler.development'); + ini_set('display_errors', true); + error_reporting(E_ALL); +} else { + ini_set('display_errors', false); +} -- cgit v1.2.3-54-g00ecf