laravel/framework — pull request #6384 by Marwelln (2014-11-11 11:04:15+00:00)
Title: [5.0] Added the ability to change the `$pageName` property

Changed the `$pageName` property to be static. There was no way to change the `$pageName` to another value without having is static when using the Paginator with the query builder.

This allows the application to set another `$pageName`.

I am aware you with this change can't have separate `$pageName` per Paginator, but when does an application have that? I've never ever seen that.

With this change, you can change the `$pageName` to another value by using

\Illuminate\Pagination\Paginator::$pageName = 'sida';

just like you would with the static method `currentPageResolver`

\Illuminate\Pagination\Paginator::currentPageResolver(function() {
return $this->app['request']->input('sida');
});

The ability to be able to do this is very important for websites not using English urls.