public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)
    {
        $per_page = ($this->request->has('per_page'))
            ? $this->request->get('per_page')
            : $perPage;

        $paginator = $this->db->paginate($per_page, $columns, $pageName, $page);

        $paginator->appends($this->request->all());

        return $paginator;
    }