staudenmeir / eloquent-has-many-deep

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

Use the `newRelatedThroughInstance` method to prepare the through parents #154

Closed hafezdivandari closed 2 years ago

hafezdivandari commented 2 years ago

This PR uses the newRelatedThroughInstance method (added on Laravel 9.5) to prepare the through parents.

staudenmeir commented 2 years ago

Please check if the method exists so we also support older versions of Laravel 9.

hafezdivandari commented 2 years ago

@staudenmeir sure, done.

staudenmeir commented 2 years ago

Thanks!

staudenmeir commented 2 years ago

I released a new version.