diff --git a/app/Contribution/Data/MemberData.php b/app/Contribution/Data/MemberData.php index b5882564..2a7279e4 100644 --- a/app/Contribution/Data/MemberData.php +++ b/app/Contribution/Data/MemberData.php @@ -29,7 +29,7 @@ class MemberData extends Data */ public static function fromModels(array $ids): Collection { - return Member::whereIn('id', $ids)->orderByRaw('lastname, firstname')->get()->map(fn ($member) => self::factory()->withoutMagicalCreation()->from([ + return Member::with('leaderMemberships', 'gender')->whereIn('id', $ids)->orderByRaw('lastname, firstname')->get()->map(fn ($member) => self::factory()->withoutMagicalCreation()->from([ ...$member->toArray(), 'birthday' => $member->birthday->toAtomString(), 'isLeader' => $member->isLeader(),