*/ public function build(): array { return [ 'plans' => Plan::query()->active()->get(), 'singlePmPriceCents' => (int) config('billing.single_pm_price_cents'), 'hubStats' => Cache::remember(self::StatsCacheKey, self::StatsTtlSeconds, function (): array { $published = PressRelease::query() ->withoutGlobalScope(PortalScope::class) ->visibleInArchive(); return [ 'releases_total' => (clone $published)->count(), 'releases_presseecho' => (clone $published)->forPortalValues([Portal::Presseecho->value, Portal::Both->value])->count(), 'releases_businessportal' => (clone $published)->forPortalValues([Portal::Businessportal24->value, Portal::Both->value])->count(), 'newsrooms' => Company::query() ->withoutGlobalScope(PortalScope::class) ->whereHas('pressReleases', fn ($query) => $query->withoutGlobalScope(PortalScope::class)->visibleInArchive()) ->count(), 'categories' => Category::query()->withoutGlobalScope(PortalScope::class)->count(), ]; }), ]; } }