gateway->type->sync($dispatcher->name, $dispatcher->gateway->domain, $this->getResults($dispatcher)); } } public function getResults(Maildispatcher $dispatcher): Collection { return Member::search(data_get($dispatcher->filter, 'search', ''))->query( fn ($q) => $q->select('*')->withFilter(FilterScope::fromPost($dispatcher->filter)) )->get()->filter(fn ($member) => $member->email || $member->email_parents)->map(fn ($member) => MailEntry::from(['email' => $member->email ?: $member->email_parents])); } }