Settable timezones with cachet config

This commit is contained in:
Joseph Cohen
2015-10-08 16:11:30 -05:00
parent ce8e710173
commit a288f84fc5
8 changed files with 32 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ class ConfigServiceProvider extends ServiceProvider
// Get app custom configuration.
$appDomain = Setting::get('app_domain');
$appLocale = Setting::get('app_locale');
$appTimezone = Setting::get('app_timezone');
// Setup Cors.
$allowedOrigins = $this->app->config->get('cors.defaults.allowedOrigins');
@@ -55,6 +56,7 @@ class ConfigServiceProvider extends ServiceProvider
// Override default app values.
$this->app->config->set('app.url', $appDomain ?: $this->app->config->get('app.url'));
$this->app->config->set('app.locale', $appLocale ?: $this->app->config->get('app.locale'));
$this->app->config->set('cachet.timezone', $appTimezone ?: $this->app->config->get('cachet.timezone'));
// Set custom lang.
$this->app->translator->setLocale($appLocale);