role !== "teacher") { abort(403, "Unauthorized action."); } return $next($request); } }