Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
1 | <?php namespace Modules\Core\Http\Middleware; |
||
31 | public function handle($request, \Closure $next) |
||
32 | { |
||
33 | $locale = $this->request->segment(1) ?: App::getLocale(); |
||
34 | $item = $this->menuItem->findByUriInLanguage($this->request->segment(2), $locale); |
||
35 | |||
36 | if ($this->isOffline($item)) { |
||
37 | App::abort(404); |
||
38 | } |
||
39 | |||
40 | return $next($request); |
||
41 | } |
||
42 | |||
53 |