app['events']->listen($localeChangedEvent, function () { $this->setLocale(); }); $this->setLocale(); } /** * Set the locale. */ protected function setLocale() { $locale = $this->app['translator']->getLocale(); Date::setLocale($locale); } /** * Register the service provider. */ public function register() { // Nothing. } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['Date']; } }