[Vuejs]-How do I get the number of items per page to work in pagination

0👍

Your controller looks right to me, are you sure you are passing the GET params in the Nova request correctly in the "getAdverts" method? Simply "hardcoding" the URL in the get() function might prove to result in some errors.

I am unfamiliar with Nova requests but for axios, which works similarly, you pass the route get parameters as the second argument in the get() function.

i.e axios.get('your/url/here, { 'perPage': variable }).

You could try adding dd($request->all() in the controller to see if the GET parameter ‘perPage’ is passed to the controller at all.

Leave a comment