, memberships: array, courses: array} $data */ public function handle(array $data): void { $localMember = InsertMemberAction::run(NamiMember::from($data['member'])); InsertMembershipsAction::run( $localMember, collect($data['memberships'])->map(fn ($membership) => NamiMembershipEntry::from($membership)), ); InsertCoursesAction::run( $localMember, collect($data['courses'])->map(fn ($course) => NamiCourse::from($course)), ); } }