src/Store/api/Paginator.php
public function paginate()
    {
        $this->count = $this->query->get()->count();
        $this->limit = $this->limit ?: $this->count;
        $this->query->skip($this->offset)->take($this->limit);
    }
public function paginate()
    {
        $this->count = $this->query->get()->count();
        $this->limit = $this->limit ?: $this->count;
        $this->query->skip($this->offset)->take($this->limit);
    }
public function paginate ( ) { $ this -> count = $ this -> query -> get ( ) -> count ( ) ; $ this -> limit = $ this -> limit ? : $ this -> count ; $ this -> query -> skip ( $ this -> offset ) -> take ( $ this -> limit ) ; }
Will modify a query builder to get paginated data and will
return an array with the meta data.

@param Illuminate\Database\Query\Builder $query

@return array
Will modify a query builder to get paginated data and will return an array with the meta data .