Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 1 year ago.
0

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.

0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.