add packing list relationship in packing list model

This commit is contained in:
omair saleh
2021-12-17 12:02:01 +08:00
parent 1d479f6f79
commit bec9f121ab
+8
View File
@@ -72,4 +72,12 @@ class PackingList extends AbstractModel implements Transportable, Steppable, Pac
{
return $this->BelongsToMany(PackingList::class, 'packing_list_owner', 'owner_packing_list_id', 'packing_list_id');
}
/**
* @return MorphMany
*/
public function packingLists(): morphMany
{
return $this->morphMany(PackingList::class, 'owner');
}
}