@boyjarv No one can help you if you don’t say what the problem is.
Implementation of pagination on NUXT project
Can anyone help me please, I’m trying to get the plug-in Laravel-Vue-pagination working on my NUXT project, I’ll buy you a coffee!
@martinbean to implement pagination into my app, I have tried Laravel-Vue-pagination plug-in
@boyjarv That doesn’t help any one.
Show what you’ve tried. Show any errors you’re getting. Otherwise we’re just going to tell you to read the installation docs.
@martinbean so I’m having issues trying to add Laravel-Vue-pagination to my NUXT app, I apparently need to register it as a component?! In the config.js file?!
@boyjarv So do that?
@boyjarv do you really need a package to paginate, you could just write your own paginator as discussed here: https://laracasts.com/discuss/channels/vue/paginating-from-my-response
But just suggestion.
Edit: A server fetched partial with next and previous links is very easy to implement, you just need to learn how a paginator code works. It is just some basic math to figure the page and links to go to page.
@jlrdw it’s all going over my head, really need some help please …. Which is why I keep asking for help
@boyjarv what github site has the paginator you are trying?
@boyjarv You’re not asking for “help” though because you’ve been unable to explain what you’ve done so far, how far you’ve gotten, and what is now blocking you progressing.
We don’t know where you are. You can’t just post, “Help me with X” and then expect people to start giving you step-by-step instructions. We need to context.
I don’t want to push why I have done so far as it’s broken my app?!
@boyjarv Well how is any one supposed to help if we don’t know what you’ve done? We’re not mind readers.
@martinbean there's no need for the sarcasm!
I. am including it as a plugin but Its not a plugin it's a component
plugins: [
'@plugins/laravel-vue-pagination',
I am getting the same issue to this: https://stackoverflow.com/questions/68178571/how-to-configure-laravel-vue-pagination-for-nuxt-js
@boyjarv So include it as a component as per the accepted answer on that Stack Overflow question.
@martinbean How?
This is where I am stuck, how can I register it as a component in NUXT?
here is my plugin file:
import Vue from 'vue'
import LaravelVuePagination from 'laravel-vue-pagination'
Vue.component('laravel-vue-pagination', LaravelVuePagination)
here is my call for the component:
<LaravelVuePagination
:data="venues"
@pagination-change-page="getResults"
:limit="5"
/>
I'm getting: Vue is not defined
Can anyone help me on this please?
did you get the answer, I'm stuck on the same thing
Found a solution
after installing laravel-vue-pagination, create plugins/vueLaravelPagination.js file
import Vue from 'vue'
Vue.component('pagination', require('laravel-vue-pagination'));
In nuxt.config.js add
plugins: [
'@/plugins/vueLaravelPagination'
],
and it will work like a charm
Please or to participate in this conversation.