Skip to content

Commit

Permalink
Improved LocaleMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
libern committed Aug 9, 2016
1 parent 875f40d commit fdc8d99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Someline/Support/Middleware/LocaleMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Someline\Support\Middleware;

use Carbon\Carbon;
use Closure;
use LaravelLocalization;
use Mcamara\LaravelLocalization\LanguageNegotiator;
Expand All @@ -24,6 +25,9 @@ public function handle($request, Closure $next)
// set locale
LaravelLocalization::setLocale($locale);

// set carbon locale
Carbon::setLocale($locale);

return $next($request);
}

Expand Down

0 comments on commit fdc8d99

Please sign in to comment.