staudenmeir / eloquent-has-many-deep

Laravel Eloquent HasManyThrough relationships with unlimited levels
MIT License
2.67k stars 157 forks source link

doesn't work together jsonRelation #67

Closed BUGOVER closed 1 year ago

BUGOVER commented 4 years ago

$this->hasManyDeepFromRelations($this->cities(), (new City())->franchisees());

City public function franchisees(): HasManyJson { return $this->hasManyJson(FranchiseRegion::class, 'city->ids', 'city_id'); }

staudenmeir commented 1 year ago

I just released new versions for both packages that add support for relationships like yours (Laravel 9+).