2.0.0 • Published 1 year ago

vue3-laravel-custom-pagination v2.0.0

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

Vue pagination for Laravel

A Laravel Paginator for vue3 components

Installation

Obs

To Vue2, use branch main\ To Vue2, use branch js3

npm

npm install vue3-laravel-custom-pagination

Then

import Pagination from 'vue3-laravel-custom-pagination'

Then that's how you insert in the .vue template:

<template>

    ...

    <pagination
        ref="pagination"
        :from="results.from"
        :to="results.to"
        :total="results.total"
        @page-changed="fetch"></pagination>

</template>

The 'page-changed' event is emmitted when the next or previous button is clicked. There are properties inside the component data called page and limit, you can use them in your component by giving a ref and then calling the values like this.$refs.pagination.page.

Roadmap

  • Make CSS customizable
  • Make props for diferent layouts (simple buttons, show page number, show total results, etc)

License

This Laravel package is open-sourced software licensed under the MIT license

2.0.0

1 year ago