Closed ghost closed 5 years ago
Hi @powerlimit.
By default, thepagerfanta adds a querystring (get) parameter called page
with the number of the page you request. You'll need to make use of this in your controller.
For example:
if ($request->get('page') !== null) {
$pagerfanta->setCurrentPage($request->get('page'));
}
You'll need to add an argument Request $request
to your controller method as well to make the request available.
You've reminded me that documentation about usage like this needs improving, so I'll try and get a PR in for that later (if I remember rightly, I actually hit this problem when I first used Pagerfanta myself!)
@sampart , merry me!! it worked. Thank you very much
Glad to hear it, @powerlimit! Thanks
Hello everyone. I'm using Pagerfanta with Symfony 4. Data on the page is displayed, the number of pages is also displayed. but when you try to go to another page, the link changes, but the page does not switch. Here is my controller![default](https://user-images.githubusercontent.com/27887514/47002386-85057780-d135-11e8-806e-f08463a33555.png)
And here is repository