Add a getter for companies in City model.

main
KKlochko 2 years ago
parent 8850d43575
commit b371ac2773

@ -26,6 +26,11 @@ class City extends Model
return $this->companies()->pluck('company_id')->toArray();
}
public function getCompanies()
{
return $this->companies;
}
public function addCompanyId(int $company_id)
{
$this->addCompanyIds([$company_id]);

Loading…
Cancel
Save