wkinne's avatar

Using Vue Js and Laravel Pagination

Hey Everyone,

Curious if anyone has implemented a scroll feature with Vue and Laravel. I would like to load each page as the user scrolls.

For example the first 25 from an ajax call load, then when the user scrolls to the bottom of that list, load another 25 and so one.

I know you can call paginate on the query, but how could I do this with vue? Just pass the page with the request?

Thank You!

0 likes
1 reply
Abi's avatar
Abi
Best Answer
Level 24

@wkinne I'd create a LoaderClass and interface for backend and for vue I would create a single loader component that connects to a single route something like /loadmore or load and then pass params to load the required data.

I might be wrong but I think this is a nice way to load content.

Please or to participate in this conversation.