public function handleApplicantCompanyChoices(Domain $domain, Applicant $applicant, Collection $request): void 	{ 		foreach ($request->get('company_names') as $rank => $company_name) { 			$company_match = $domain->companies()->includes()->findByNameOrAlias($company_name); 			$company = $company_match->first();  			if ($company_match->count() == 0) { 				$company = Company::create([ 					'name' => $company_name, 					'domain_id' => $domain->getKey(), 				]); 			}  			if ($company) { 				$applicant->applicantCompanyPivot()->updateOrCreate([ 					'applicant_id' => $applicant->getKey(), 					'company_id' => $company->getKey(), 					'rank' => $rank, 				]); 			} 		} 	}