Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

v1.1.0

Choose a tag to compare

@mpyw mpyw released this 27 Aug 15:18
· 20 commits to master since this release
5ef4679

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()