Devise\Search\Pagination::toJson PHP Method

toJson() public method

Turns this object into a json serialized object
public toJson ( integer $options ) : string
$options integer
return string
    public function toJson($options = 0)
    {
        return json_encode(array('total' => $this->total, 'page' => $this->page, 'per_page' => $this->perPage, 'data' => json_decode($this->items->toJSON())));
    }