check()) { return redirect()->route('login'); } if (auth()->user()->type !== 'admin') { abort(404); } return $next($request); } }