*/ private function companyContacts(int $companyId): Collection { if ($companyId <= 0) { return new Collection; } return Contact::forCompany($companyId) ->get(['id', 'company_id', 'first_name', 'last_name', 'responsibility', 'phone', 'email']); } private function companyContact(int $contactId, int $companyId): ?Contact { if ($contactId <= 0 || $companyId <= 0) { return null; } return Contact::forCompany($companyId)->whereKey($contactId)->first(); } private function defaultContactIdFor(int $companyId): ?int { if ($companyId <= 0) { return null; } return $this->companyContacts($companyId)->first()?->id; } }