1.0.6 • Published 1 year ago

vue-laravel-paginate v1.0.6

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

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

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago