fix the polymorph relation
This commit is contained in:
@@ -172,14 +172,19 @@ class RoadItemsProject extends Model
|
||||
{
|
||||
return $this->morphToMany(CMMSMachine::class,
|
||||
'machinable',
|
||||
'cmms_machine_road_items_project',
|
||||
'road_items_project_id',
|
||||
'machinables',
|
||||
'machinable_id',
|
||||
'machine_id'
|
||||
);
|
||||
}
|
||||
|
||||
public function rahdaran(): MorphToMany
|
||||
{
|
||||
return $this->morphToMany(Rahdaran::class, 'rahdarable', 'rahdaran_road_items_project');
|
||||
return $this->morphToMany(Rahdaran::class,
|
||||
'rahdarable',
|
||||
'rahdarables',
|
||||
'rahdarable_id',
|
||||
'rahdar_id',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,5 +201,6 @@ return [
|
||||
'fields.*.type' => 'نوع فیلد',
|
||||
'fields.*.option' => 'گزینه های فیلد',
|
||||
'cmms_machine_id' => 'کد یکتا ماشین',
|
||||
'contract_subitem_id' => 'کد یکتای پروژه',
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user