Support the ongoing development of Laravel.io →
Configuration Views Packages
Last updated 2 years ago.
0

found my way to do it

0

DeeJaVu said:

found my way to do it

Would you please share? I have just started working on a project employing the same API and am currently wondering how to do this.

Update: I have been doing more research into this and, while it's not working, I have discovered the following:

Running dd(get_class_methods($popular)); tells me that I have the following to work with, among others:

 1 => "getPage"
 2 => "setTotalPages"
 3 => "getTotalPages"
 4 => "setTotalResults"
 5 => "getTotalResults"

But I still can't figure out how to turn these into paginated results. I have followed several other threads but none of them seem to work. Can someone please point me in the right direction?

In addition to the above the API allows me to fetch a specific page like this: $popular->getPopular(['page' => 3'])

So in my routes I add a popular/{page} variable and then in my method I pass popular($page and I can then manipulate the URL using numbers, but this still isn't real pagination.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

DeeJaVu deejavu Joined 24 Aug 2015

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.