Refactor the City and its tests.

This commit is contained in:
2023-08-15 13:15:24 +03:00
parent 6db3465407
commit 394f821d35
3 changed files with 40 additions and 3 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ class City extends Model
$this->companies()->sync($companyIDs);
}
public function removeCompanyID(int $company_id)
public function removeCompanyId(int $company_id)
{
$this->companies()->detach($company_id);
}
@@ -52,7 +52,7 @@ class City extends Model
$this->companies()->detach($company_ids);
}
public static function validate_with_name(string $name)
public static function validateWithName(string $name)
{
$name = $name ?? '';