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