I am using https://github.com/gilbitron/laravel-vue-pagination pagination it works fine.I have included pagination in the page as below
<pagination :data="posts" @pagination-change-page="getResults"></pagination>
and the method
getResults(page = 1) {
axios.get('api/post?page=' + page)
.then(response => {
this.posts = response.data;
});
},
Now when i searchBy Category the pagination links shows api/findByCategoy?page=1
selectCatgory(e) {
axios.get('api/findByCategoy?category=' + e.target.value)
.then((data) => {
this.posts = data.data
})
.catch(() => {
})
},
How to include GET param in the pagination urls
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire