*/ public function query(): Builder { return Member::where(function ($query) { return $query->where('efz', '<=', now()->subYears(5)->endOfYear()) ->orWhereNull('efz'); }) ->whereCurrentGroup() ->orderByRaw('lastname, firstname') ->whereHas('memberships', fn ($builder) => $builder->isLeader()->active()); } /** * @return array{members: array} */ public function data(): array { return [ 'members' => $this->query()->get()->map(fn ($member) => $member->fullname)->toArray(), ]; } public function component(): string { return 'efz-pending'; } public function title(): string { return 'Ausstehende Führungszeugnisse'; } public function render(): string { return '
'; } }