laravel pagination vuetify

Solutions on MaxInterview for laravel pagination vuetify by the best coders in the world

showing results for - "laravel pagination vuetify"
Florencia
16 May 2019
1<v-pagination
2    v-model="pagination.current"
3    :length="pagination.total"
4    @input="onPageChange"
5></v-pagination>
Ricky
19 Jun 2019
1export default {
2    data() {
3        return {
4            users: null,
5            pagination: {
6                current: 1,
7                total: 0
8            }
9        }
10    },
11    methods: {
12        getUsers() {
13            window.axios.get('/api/users?page=' + this.pagination.current)
14                .then(response => {
15                    this.users = response.data.data;
16                    this.pagination.current = response.data.current_page;
17                    this.pagination.total = response.data.last_page;
18                });
19        },
20        onPageChange() {
21            this.getUsers();
22        }
23    },
24    mounted() {
25        this.getUsers();
26    }
27}