| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function handle(Request $request, Closure $next) |
||
| 40 | { |
||
| 41 | if ($this->i18n->routedLocale($request) === null) { |
||
| 42 | $negotiator = $this->i18n->getConfig('negotiator'); |
||
| 43 | $locale = app($negotiator)->preferredLocale($request); |
||
| 44 | |||
| 45 | return redirect($this->i18n->url($request->fullUrl(), $locale)); |
||
| 46 | } |
||
| 47 | |||
| 48 | return $next($request); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |