route()->parameter('server'); /** @var \Pterodactyl\Models\Allocation|null $allocation */ $allocation = $request->route()->parameter('allocation'); if ($allocation && $allocation->server_id !== $server->id) { throw new NotFoundHttpException; } return $next($request); } }