samedi 30 janvier 2016

in laravel 5, which function parameter does the /?page= url argument feed?

i need to have two different paginators in one page, using ajax to dynamically load the paged content in each of the div's.

the thing that concerns me is where to feed the page argument in my controller, that corresponds to the page number i want to retrieve from the paginator. i don't seem to have sorted that one out, although i have been running through the Builder, Paginator, AbstractPaginator source code thoroughly... guess my code architecture comprehension needs a boost....

the technique that i follow is render() the pager controls, then modify them with jquery in a way that href=/random/route/?page=4 becomes onclick=/random/route/pager-type/4

i have setup the appropriate routes ** /random/route/{pager-type?}/{page-no?} ** but i have no understanding on how to use the page-no argument in extracting the page i am interested in from the pager instance.

thanks everyone in advance!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1ShU7eM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire