I want to make a simple change on the Laravel pagination.
By default I get a "?page=x" URI but I need this: "?pag=x".
How can I make this change? I read the documentation and I found this:
Customizing The Paginator URI
The setPath method allows you to customize the URI used by the paginator when generating links. For example, if you want the paginator to generate links like http://example.com/custom/url?page=N, you should pass custom/url to the setPath method:
Route::get('users', function () {
$users = App\User::paginate(15);
$users->setPath('custom/url');
//
});