enabled || ! in_array((int) $actor->id, self::grantedUserIds(), true) || ! $actor->companies()->where('companies.id', company_id())->exists()) { return false; } $section = collect(SidebarPermissions::navigationFor($actor))->firstWhere('slug', 'courier-payables'); return collect($section['pages'] ?? []) ->flatMap(fn (array $page): array => [$page, ...($page['children'] ?? [])]) ->contains('slug', 'courier-information'); } }