*/ public Collection $members; public function mount(): void { $this->members = 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()) ->get(); } public function title(): string { return 'Ausstehende Führungszeugnisse'; } public function render(): string { return <<<'HTML'
@foreach($members as $member)
{{$member->fullname}}
@endforeach
HTML; } }