public function applyAllScopesToQuery($query)
    {
        $this->defineFilterScopes();

        foreach ($this->allScopes as $scope) {
            $this->applyScopeToQuery($scope, $query);
        }

        return $query;
    }
public function applyAllScopesToQuery($query)
    {
        $this->defineFilterScopes();

        foreach ($this->allScopes as $scope) {
            $this->applyScopeToQuery($scope, $query);
        }

        return $query;
    }
public function applyAllScopesToQuery ( $ query ) { $ this -> defineFilterScopes ( ) ; foreach ( $ this -> allScopes as $ scope ) { $ this -> applyScopeToQuery ( $ scope , $ query ) ; } return $ query ; }
Applies all scopes to a DB query.
@param  Builder $query
@return Builder
Applies all scopes to a DB query .