route('environment'); $environment = Environment::with('application')->findOrFail($id); return inertia('environments/Show', [ 'environment' => $environment, 'servers' => inertia()->optional(function () use ($environment) { return $environment ->application ?->organisation ?->servers() ->where('status', ServerStatus::ACTIVE) ->with('services') ->get() ?? []; }), ]); } }