This commit is contained in:
2025-08-27 10:43:40 +03:30
parent 5804b394a2
commit 9a6701288d
6 changed files with 66 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ class City extends Model
'geometry',
];
public function province()
public function province(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo('App\Models\Province');
}
@@ -76,7 +76,7 @@ class City extends Model
return $this->hasMany('App\Models\RoadConstructionRural');
}
public function edarateShahri()
public function edarateShahri(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
{
return $this->belongsToMany('App\Models\EdarateShahri', 'edarate_shahri_be_city')->withPivot('is_primary','id');
}