Pagination in Inertiajs
See original GitHub issueVersions:
@inertiajs/inertia
version: “^0.8.4”@inertiajs/inertia-vue3
version: “^0.3.5”
Describe the problem:
This is my Vue Component Code for pagination
<inertia-link v-if="$page.props.categories.meta.links[index].url"
:href="$page.props.categories.meta.links[index].url"
:headers="{ page: index }"
as="button" type="button">
<span class="rounded-2 p-2 text-white mx-2"
:class="[ $page.props.categories.meta.links[index].active ? 'bg-dark cursor-default' : 'bg-red-600' ]"
v-html='$page.props.categories.meta.links[index].label'>
</span>
</inertia-link>
This code for index in Laravel 8
public function index()
{
$categories = CategoriesResources::Collection(Categories::paginate(10));
return Inertia::render('Categories/Index', ['categories' => $categories]);
}
The problem is when I want to change the page its only change one page like from page[1] to page[3] and then I can’t change any more and that’s need Reloading the page
in inertia-linl tag I send to it Array of links how can I modify the URL link in the page without reload the page
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Laravel + Inertia + Vuejs: Pagination - Stack Overflow
Creator of Inertia.js here.. So, you can totally use the Laravel paginator with Inertia, you just need to setup your page components to ......
Read more >Pagination - Build Modern Laravel Apps Using Inertia.js
You'll be happy to hear that Laravel makes a pagination laughably simple to implement. In this episode, we'll add a list of pagination...
Read more >Laravel 9 Vue Inertia Pagination Integration Tutorial
How to Integrate Inertia Js Pagination in Laravel 9 ; Step 1: Create Laravel App ; Step 2: Connect to Database ; Step...
Read more >Laravel Inertia JS Pagination Example - ItSolutionStuff.com
Hi,. This article is focused on laravel inertia js pagination example. you'll learn laravel inertia js pagination. if you want to see ...
Read more >Inertia Js Paginate - gists · GitHub
Inertia Js Paginate. GitHub Gist: instantly share code, notes, and snippets.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When you access this app in your browser, what’s the URL? Is it different than http://localhost:8000? If yes, that’s the issue. You’ll need to look into how to properly set the app URL. I don’t think this is an Inertia issue.
Glad you got it figured out. 👍