mpyw/eloquent-has-by-non-dependent-subquery
Drop support for stale versions (#6)
We now accept a
Builderargument to prevent common mistakes.Comment::query()->hasByNonDependentSubquery( 'post', function (Relation $query) { // $query is a Relation instance $query->onlyTrashed(); } )->withTrashed()Comment::query()->hasByNonDependentSubquery( 'post', function ($query) { // $query is a Relation instance $query->onlyTrashed(); } )->withTrashed()Comment::query()->hasByNonDependentSubquery( 'post', function (Builder $query) { // $query is a Builder instance! (Previously it triggered an error) $query->onlyTrashed(); } )->withTrashed()
Release 🎉
How can I help you explore Laravel packages today?