vue-laravel-paginate
v1.0.6
Published
This is vue js package, using to Laravel API
Downloads
14
Maintainers
Readme
vue laravel paginate
this package use only laravel api purpose
Install Package
npm install vue-laravel-paginate
Import Package
import Paginate from "vue-laravel-paginate";
Implementation example
components: {
Paginate
},
data() {
return {
data: []
}
},
mounted() {
this.getData()
},
methods:{
getData(page = 1) {
axios.get('your-laravel-api'+'?page='+page).then((response) => {
this.data = response.data
}).catch((error) => {
console.log(error);
});
},
}
Implementation html example
<Paginate v-on:changepage="getData($event)"
:from="data.from"
:to="data.to"
:total="data.total"
:links="data.links"
:currentPage="data.current_page"/>
Required attribute:
1. v-on:changepage="getData($event)"
2. :links="data.links"
3. :currentPage="data.current_page"
Laravel API:
return User::paginate(25);
Author Info
Name: Rashiqul Rony Github: https://github.com/RashiqulRony