public function syncEmails(Contact $contact, array $emails = null) { if (isset($emails)) { $contact->emails()->delete(); foreach ($emails as $email) { if (!empty($email['email'])) { $email = $this->emails->newInstance($email); $contact->emails()->save($email); } } } }