public function scopeFilter($query)
    {
        if (!$this->filters) {

            $message = 'Please set the $filters property.';
            throw new FilterableSortableException($message);
        }

        $this->filters = app()->make($this->filters);

        if (!$this->filters instanceof QueryFilters) {

            $message = '$filters property must be a class instance of QueryFilter.';
            throw new FilterableSortableException($message);
        }

        return $this->filters->apply($query);
    }