getQuery()->getGroupBy(); }; } public function getScopes() { return function () { return $this->scopes; }; } public function getSelect() { return function () { return $this->getQuery()->getSelect(); }; } protected function getRelationWithoutConstraintsProxy() { return function ($relation) { return Relation::noConstraints(function () use ($relation) { return $this->getModel()->{$relation}(); }); }; } }