refactor
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user