refactor: update models relations

This commit is contained in:
2026-08-16 17:00:01 +03:30
parent bd0e1aab31
commit a226931a77
5 changed files with 56 additions and 21 deletions
+6
View File
@@ -25,6 +25,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
*
* @property Country $country
* @property Province $province
* @property Collection|Airport[] $airports
* @property Collection|Tour[] $tours
* @property Collection|User[] $users
*
@@ -59,6 +60,11 @@ class City extends Model
return $this->belongsTo(Province::class);
}
public function airports()
{
return $this->hasMany(Airport::class);
}
public function tours()
{
return $this->hasMany(Tour::class, 'destination_city_id');