You shouldn't be using route parameters like that for pagination. You should be using the query string, which is what it was intended for. And don't say something like "but that's ugly", because that's no reason NOT to use something in the manner in which it was designed to be used.
It sounds like you're rolling your own form of pagination as well. Laravel provides a built-in pagination component which is integrate with the database component and Eloquent. Worth checking out. It will automatically add the page data to the query string when it generates the links for you.
Hi,
Thanks for the reply.
I did sort out of the routing issue, but I wasn't aware of the pagination component. I'm having a look at it right now.
Some of the information I have to display requires a few database queries, then I have to proceess it through various PHP array functions in order to make it presentable and usable.
If I understand correctly, I can construct the pagination links manually.
Thanks for pointing this out to me.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community