public function paginate($page = 1, $perPage = null, $columns = ['*'])
    {
        $perPage = $perPage ?: $this->defaultPageSize;

        $query = $this->getQuery();

        $total = $query->getQuery()->getCountForPagination($columns);
        $query->getQuery()->forPage($page, $perPage);
        $results = $query->get($columns);

        $results = new LengthAwarePaginator($results, $total, $perPage, $page);

        return $this->returnResults($results);
    }