Skip to content

Commit

Permalink
Merge 575d1ce into 1db4d58
Browse files Browse the repository at this point in the history
  • Loading branch information
glaucomorais authored Sep 26, 2017
2 parents 1db4d58 + 575d1ce commit 1af8501
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/DateServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ class DateServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->app['events']->listen('locale.changed', function () {
$this->setLocale();
});
if (version_compare(\App::version(), '5.5') >= 0) {
$this->app['events']->listen(LocaleUpdated::class, function() {
$this->setLocale();
});
} else {
$this->app['events']->listen('locale.changed', function () {
$this->setLocale();
});
}

$this->setLocale();
}
Expand Down

0 comments on commit 1af8501

Please sign in to comment.