Closed mirzazeyrek closed 2 years ago
You can reuse the existing relationships:
public function supplier(): ?HasOneDeep
{
return $this->hasOneDeepFromRelations($this->supplierBranch(), (new SupplierBranch)->supplier())
->withTrashed('supplier_branches.deleted_at')
->withTrashed();
}
Thanks for the awesome work on this package.
I check the readme but couldn't exactly found an example for my case:
What I'm trying to do is building a ->supplier relationship in Offer model: