staudenmeir / belongs-to-through

Laravel Eloquent BelongsToThrough relationships
MIT License
1.15k stars 88 forks source link

Add withTrashed #34

Closed wnateg closed 5 years ago

wnateg commented 5 years ago

Hello,

In your other package, hasmanydeep, there is a withTrashed function that I believe would work well with this package too.

https://github.com/staudenmeir/eloquent-has-many-deep/blob/48e5a70eeddbae87eea21dcc576eeb5d7377057f/src/HasManyDeep.php#L301

wnateg commented 5 years ago

I made a pull request. I literally just copy and pasted the method from hasmanydeep, but it seems to work from my limited testing.