This repository was archived by the owner on Nov 21, 2023. It is now read-only.
v1.1.0
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()