This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
Releases: mpyw/eloquent-has-by-non-dependent-subquery
Releases · mpyw/eloquent-has-by-non-dependent-subquery
v2.0.3
v2.0.2
v2.0.1
v2.0.0
v1.1.0
We now accept a
Builder
argument 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()