dfuncd / repofuck

Fucking with the Repository Design Pattern
6 stars 2 forks source link

On setting the current page in paginate() function #123

Open makoru-hikage opened 7 years ago

makoru-hikage commented 7 years ago

There is only one parameter in paginate, $items. If someone wants to go to page 2, how shall it be done?

In Illuminate\Database\Query\Builder, the paginate method has four arguments:

public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null)

If Repofuck's paginate shall be refactored, it must supply the corresponding arguments: $this->paginates, $this->columns, null, $page_number.