jinsonjose's avatar

How to create a pagination in vue + laravel

i want a pagination like < 1-10 of 189 > like this how to handle this in vue ??

any package to handle this??

can you help??

0 likes
2 replies
zoidq's avatar

Have you checked out the Laravel Pagination Docs ?

You could achieve this via blade like so:

<div class="container">
    @foreach ($users as $user)
        {{ $user->name }}
    @endforeach
</div>

{{ $users->links() }}

Or perhaps if you wanted to handle this from within vue, could do something like:

<example-component v-bind:pages="{{ $users->links() }}"></example-component>

And access the pages variable from within your component?

Vue.js Props Docs

Please or to participate in this conversation.