Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

mvnobrega's avatar

How to number paging IDs continuously?

In short, I want to display an ID that goes from 1 to the last element of the pagination. So that page one has ID from 1 to 20, page two from 21 to 30 and so on. It seems simple, but I've tried everything and it doesn't work. My loop: <tr class="odd:bg-fundo" v-for="cripto in criptos"> <td class="border-l border-borda p-4 text-center">

mvnobrega's avatar
mvnobrega's avatar mvnobrega2yrs agoVue
4
2
Last reply by mvnobrega 2yrs ago
Jdagger's avatar

Attempt to read property "email" on null | Laravel 11.x

Hey guys, I have a weird problem which I can't replicate the problem with a working version because I didn't use version control (lesson learned). Anyway, I have trouble with the pagination method and data fetching while going to the next page of data in a table, shown in the app. Thing is, the first page works perfectly fine. I'm getting the ErrorException [title name] error w

Jdagger's avatar
Jdagger's avatar Jdagger2yrs agoLaravel
2
4
Last reply by Jdagger 2yrs ago
Mrtvac's avatar

Cursor paginate in Laravel Scout

Hi, Is there any particular reason why cursorPaginate couldn't be implemented into Laravel Scout? I haven't explored all search drivers but I presume it would be hard or not able to implement it in all search drivers? (except "database") Because I'm using infinite scroll on large datasets, cursor paginate works better in our case and was planning on using it for "

Mrtvac's avatar
Mrtvac's avatar thepanda11mos agoEloquent
1
2
Last reply by thepanda 11mos ago
willstori's avatar

Update carousel with Liverwire 3 + Swiper.js

how are you? I'm having an issue with updating the slides of my carousel controlled by Livewire. Every time I filter the slides with Livewire, the carousel breaks. Below is the code for my component. Blade file of the component: <div class="container"> <div class="d-flex gap-2 justify-content-center py-5"> <button class

willstori's avatar
willstori's avatar trevorgree...1yr agoLivewire
1
1
Last reply by trevorgreenleaf 1yr ago
vincent15000's avatar

Nested API resources

Hello, For APIs in a Laravel app, I have create several API resources. I have 3 questions about the resources. Look at this example where I retrieve all books in the database (no matter about pagination, it's just to explain). Situation 1 - In some situation I need to return all properties (for example to list the books in a table) and in other situations I need to return only

vincent15000's avatar
vincent15000's avatar vincent150...2yrs agoLaravel
6
4
Last reply by vincent15000 2yrs ago
mdhelal's avatar

Tanstack Table With React Inertia Laravel

I'm making a website using Laravel inertia and React. I want to use the Tanstack Table in my project. I want server-side pagination. how can I do it? please help me.

mdhelal's avatar
mdhelal's avatar gych2yrs agoLaravel
1
1
Last reply by gych 2yrs ago
insight's avatar

Issue in usage of datatable in Laravel 10

Dear Friends, I am using Laravel 10 form with datatables for listing data in onchange of dropdown. Shows data correctly but the navigation link shows incorrect as shown my javascript part is $(document).ready(function() { // ...................... Data Table ...................... new DataTable('#itemtypeTable'); $('#dt-length-0').next().rem

insight's avatar
insight's avatar insight2yrs agoLaravel
0
1
mehdi79's avatar

Why Livewire component not working inside <td> of table?

I have users table and inside table rows, I use edit-user component to load a modal. when I use this edit-user component inside <td> tags, wire:key is messed up and edit-user component is not loading in every row and functionality of pagination and search broke. but when using it out of <td> tags even <tr>, it works without problem. Table Rows: (edit section)

mehdi79's avatar
mehdi79's avatar mehdi792yrs agoLivewire
6
2
Last reply by mehdi79 2yrs ago
mehdi79's avatar

Error when paginating or searching in table of nested Livewire row components

I have a table , It's a named Livewire component , inside it I use another named component in loop for each of my table. At this time I can not paginate more than only 1 time Livewire show errors at console: Uncaught Snapshot missing on Livewire component with id: DVuxu9Q0wY6RAPgxfc1C Also watch this video : pagination doesn't render rows and pagination buttons are disabled,

mehdi79's avatar
mehdi79's avatar Snapey2yrs agoLivewire
6
1
Last reply by Snapey 2yrs ago
mehdi79's avatar

Nesting Livewire component in loop causes uncaught snapshot Error

In Livewire I have users table and have put a user-row component inside loop for this table. Added some actions like Edit User, that opens a modal to edit user data in a dropdown then I put modal and modal button inside another component called userEditModal. After that I added modal component to user row component I'm getting confusing errors after some events for example afte

mehdi79's avatar
mehdi79's avatar mehdi792yrs agoLivewire
3
1
Last reply by mehdi79 2yrs ago
totoosa's avatar

Livewire doesn't keep track of my request when navigating within my component.

I have a blogpost component that renders blogpost and shows categories ontop as a means of filtering said blogpost across different topics. Now all functionality of rendering, filtering ,pagination and searching works as expected but after navigating to a particular category and we attempt to go to a next page or search blogposts. the filtering to determine which blogpost which

totoosa's avatar
totoosa's avatar LaryAI2yrs agoLivewire
1
1
Last reply by LaryAI 2yrs ago
nikoloz's avatar

How to consume external API with filament/laravel

Hello, I have 3 party API endpoints where there are customers, I want to retrieve these customers using Pagination and display them on the page in a filament. I can't save these customers in the database, so I won't be able to make a query. Have you ever had a similar case? ( i tried Sushi but this package with limitations )

nikoloz's avatar
nikoloz's avatar eduardoxim...1yr agoLaravel
6
2
Last reply by eduardoximenes 1yr ago
emmatraversy's avatar

Change State Between Page (Parent) and Datepicker (Child) Components from query string

Hi everyone I have this Datepicker component and I managed to get the state in the parent (Inertia Page) by passing a function:setParentDate import React, { useState } from 'react'; import DatePicker from 'react-datepicker'; import '../../css/react-datepicker.css'; export default function TableDatePicker({setParentDate}) { const [dateRange, setDateRange] = useState([null,

emmatraversy's avatar
emmatraversy's avatar martinbean2yrs agoReact
1
4
Last reply by martinbean 2yrs ago
emmatraversy's avatar

Inertia Data Table Search Keeps Refreshing The Page

Hi everyone, I have implemented a simple search functionality for users table but for some reason Page is getting refreshed even without typing in searchbox it gets constantly refreshed: My Users/Index.jsx file: import { Head } from '@inertiajs/react'; import Layout from '@/Layouts/Layout'; import Pagination from '@/Components/DataDisplay/Pagination'; import { useState, useEffe

emmatraversy's avatar
emmatraversy's avatar gych2yrs agoInertia
7
1
Last reply by gych 2yrs ago
marnixk77's avatar

'Global' search option with livewire

I have a searchbar at the top of my admin section and would lilke to use it a 'global' search option. So when I type something in it it should search in the db/section I am in. E.g. if I am on the users page it should search for user, if I am on the products page it should search for product. But when I type there is no update to the backend/controller. If have a normal control

marnixk77's avatar
marnixk77's avatar LaryAI2yrs agoLivewire
1
1
Last reply by LaryAI 2yrs ago
rzrusu's avatar

Can you use the default Laravel paginator with Livewire?

I'm having an issue paginating Spatie's query builder with the Livewire paginator. Applying filters works, and the paginator correctly shows the number of results and pages, but if you try to change to the next page, it will go to the second for the ENTIRE collection, ignoring the filters in place. If I use the default Laravel paginator with Spatie's append method, it works par

rzrusu's avatar
rzrusu's avatar rzrusu2yrs agoLivewire
1
1
Last reply by rzrusu 2yrs ago
reeju619's avatar

Not working multi-filter system in my real estate laravel 10 project

Hello everyone! i hope you all are doing well. I am developing a real estate website, there is a property page. In this page the requirement is that there will be a multi filtering system. User can filter properties by category, price range, parking spots, and BHK(Bedroom, Hall and Kitchen). Suppose user first will select apartment category, according to that category every pro

reeju619's avatar
reeju619's avatar reeju6195mos agoJavaScript
5
1
Last reply by reeju619 5mos ago
Popa's avatar

I need help laravel version migration issue from v5.x to v7.x

I have laravel project built on v5.x I have migrated laravel version from v5.x code to v7.x. but I have issue on Table relationship on v7.x for example, belongsTo and hasOne relationship between User and Country table works on v5.x but it doesn't work on v7.x. It looks like table left join doesn't work after v7.x migration ----------User.php------------------ class User extends

Popa's avatar
Popa's avatar martinbean2yrs agoLaravel
8
1
Last reply by martinbean 2yrs ago
cscazorla's avatar

Issue dispatching an event from one Livewire component to another

Hi, I am building a basic application to do some CRUD operations. I have two models, Article and Image, that are related through a one-to-many relationship. I created two Livewire components: Index and Edit. Index just fetches the articles from the database and paginates them in a table. Edit carries out all the CRUD operations for an article and images. In the Edit render view

cscazorla's avatar
cscazorla's avatar cscazorla2yrs agoLivewire
4
1
Last reply by cscazorla 2yrs ago
Blear's avatar

Problem with ag grid after using livewire

After using livewire the table component stopped working, it generates pagination sections but does not render columns with data, data is available in both places. Pagination shows the number of addresses correctly. There is code for x-table component and livewire component: <div> <button onclick="my_modal_3.showModal()" class="btn btn-primary">

Blear's avatar
Blear's avatar Blear2yrs agoGeneral
7
1
Last reply by Blear 2yrs ago
MichielE's avatar

Laravel Liveware table changes values on refresh

I'm not sure wether to post this in Laravel or Livewire, but I thought this was the best place. So I started with Livewire and created a simple datatable. Live search, pagination and sortable all works. In my table I show several data. But whenever I filter (either by search, pagination or sortable) the component changes the value of the status of all the posts to "Publish

MichielE's avatar
MichielE's avatar MichielE2yrs agoLivewire
2
2
Last reply by MichielE 2yrs ago
libertey's avatar

Problem with orWhere method in Builder Class

Hello, I have a huge filter that can recognize a lot of things in connection with a keyword. First, we had the Filter only search for the keyword in the title and anything that comes in addition to said filter works perfectly well, now someone recognized it and wanted to recognize the body as well. So before I had the statement like that, in the statement is also the previously

libertey's avatar
libertey's avatar libertey2yrs agoLaravel
0
1
danichangt's avatar

The GET method is not supported for route livewire/update. Supported methods: POST.

I have an application with Laravel 10 and Livewire 3. I'm using Livewire pagination specifically links('pagination::tailwind'), I don´t knot why if I use "links()" all work fine excepet the background color of the current page. The bg only works if I use "links('pagination::tailwind'), but with this way I have this error when I open and close a modal window, I th

danichangt's avatar
danichangt's avatar brunopitho...3mos agoLivewire
12
1
Last reply by brunopithon8 3mos ago
nunodonato's avatar

Help me with Livewire architecture

Hi folks I'm venturing in Livewire for a webapp I am making. Due to the less common UI I am working on, I'm facing some struggles on how to organize livewire components. The screen is composed of main content and a sidebar. The sidebar has 2 different components, that I want to navigate(think, pagination) independently. However, I also want to refresh or apply different filters

nunodonato's avatar
nunodonato's avatar LaryAI2yrs agoLivewire
1
1
Last reply by LaryAI 2yrs ago
Melquisedeque's avatar

Como customizar o método paginate? How to customize the paginate method?

Estou utilizando o método paginate no meu projeto com laravel 10, mas eu gostaria de customizar ou remover o texto que aparece junto dos botões de paginação. exemplo: Showing 1 to 5 of 12 results para: Mostrando de 1 a 5 de 12 resultados ==================//================== I'm using the paginate method in my project with laravel 10, but I would like to customize or remove th

Melquisedeque's avatar
Melquisedeque's avatar pmeneses972yrs agoLaravel
2
1
Last reply by pmeneses97 2yrs ago
Zaendrick's avatar

Inertia router preserveState doesn't work

I tried to create a server-side filter, but when I use the filter, my page reloads and my checkbox is no longer checked, even though the result is what I'm expecting. import MatchCard from "@/Components/MatchCard.vue"; import Pagination from "@/Components/Pagination.vue"; import FilterSide from "@/Components/FilterSide.vue"; import MainLayout from

Zaendrick's avatar
Zaendrick's avatar Zaendrick2yrs agoInertia
0
1
luisferfranco's avatar

Buttons stop working after deleting a model

I'm just starting using Livewire 3, I have done this many times in Livewire 2 and works, so this puzzles me. Loginc in my component is quite easy: send the paginated User to the blade: public function render() { return view('livewire.user.index', [ 'users' => \App\Models\User::where('name', 'like', "%$this->search%") ->paginate(10), ]); } Then

luisferfranco's avatar
luisferfranco's avatar luisferfra...2yrs agoLivewire
2
1
Last reply by luisferfranco 2yrs ago
srle90's avatar

How to include laravel-vue-pagination properly

Index.vue:76 [Vue warn]: Failed to resolve component: Pagination If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. Try npm i --save-dev @types/laravel-vue-pagination if it exists or add a new declaration (.d.ts) file containing declare module 'laravel-vue-pagination';ts(7016)

srle90's avatar
srle90's avatar srle902yrs agoVite
0
1
Dommmin's avatar

Laravel API + React Query Filter, Sort, Paginate

I have simple app with search, filter, sort and pagination. Can someone give me feedback if everything is ok or maybe something should be improved. In Laravel Controller: public function index(Request $request) { $perPage = $request->get('perPage', 10); return Post::with(['user:id,name', 'category:id,name']) ->when($request->filled('category'), functio

Dommmin's avatar
Dommmin's avatar Dommmin2yrs agoReact
0
1
alex2112's avatar

Convert query builder to eloquent

Hello guys, i have a task where i need to change from query builder to eloquent pagination. This is the code: $draw = (int)$request->input('draw'); $columns = $request->input('columns'); $length = (int)$request->input('length'); $start = (int)$request->input('start'); $skip = $length * $start; $search = $request->input('search'); How will the pagination look like

alex2112's avatar
alex2112's avatar alex21122yrs agoEloquent
2
1
Last reply by alex2112 2yrs ago
SigalZ's avatar

Bootstrap Paginator shows Tailwind paginator

Working with Laravel 10 In my Livewire component I have: { return view('livewire.admin.user.user-table', [ 'users' => User::search($this->search) ->where('active', $this->active) ->orderBy($this->sortBy, $this->sortAsc ? 'asc' : 'desc') ->paginate($this->perPage) ]); } In

SigalZ's avatar
SigalZ's avatar SigalZ2yrs agoLaravel
3
1
Last reply by SigalZ 2yrs ago
Hello_World's avatar

Adding chart inside table component in filament php

I am using filament php version 3 in my laravel app. I have a table which has trends data for each model. Now i need to show a line chart for each record of the table. I have tried filament custom ViewColumn to achieve this. public function table(Table $table): Table { return $table ->recordTitleAttribute('keyword') ->defaultPagination

Hello_World's avatar
Hello_World's avatar LaryAI2yrs agoLaravel
1
1
Last reply by LaryAI 2yrs ago
quegs's avatar

Updating results of large datasets is super slow

I am working on a livewire page that displays a long table (1000ish rows) of data based on some filter options in a form on the same page. The end users want to be able to see all the data on the same page so I am not using pagination. As expected, it takes a few seconds to load the page due to the amount of data...and the users are okay with that. The problem I am having is th

quegs's avatar
quegs's avatar Uplink1yr agoLivewire
14
1
Last reply by Uplink 1yr ago
Furrukh's avatar

What am I doing wrong with my Dusk Test

I am working with a Laravel 10 Inertia React Stack. I have a dropDown made using the boiler plate scaffolded DropDown button that comes with breeze React install as `<div className="filterButtons"> <Dropdown> <Dropdown.Trigger > <span className="inline-flex rounded-xl"> <button dusk="categoriesButton" type="button&qu

Furrukh's avatar
Furrukh's avatar Furrukh2yrs agoTesting
2
1
Last reply by Furrukh 2yrs ago
joostr02's avatar

Best practice for using the same controller function for web and API users.

Hi there, This is my first time making an post here and I hope I've put it under the right channel. But I'm strugling with making an function of my controller available for API users and web users. I want to make an API endpoint which returns data with pagination and where the user is able to filter through JSON that he posts to the endpoint. I also want to make an headless web

joostr02's avatar
joostr02's avatar JabatoFore...2yrs agoDesign
11
1
Last reply by JabatoForever 2yrs ago
EmilMoe's avatar

Keep existing Query String

Are there any clever ways of preserving query strings when I have a page mixed up with tables (column sort), search and pagination. All 3 different components working together. I would rather keep it as they are not aware of each others query string parameters. It seems like withQueryString() is only working for pagination, so when i sort by a column the pagination and search e

EmilMoe's avatar
EmilMoe's avatar EmilMoe2yrs agoInertia
1
1
Last reply by EmilMoe 2yrs ago
anonymouse703's avatar

All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.

I thought everything is ok until the QA test. in the first load pagination looks fine but when I click next or the page number there's a prompt All Inertia requests must receive a valid Inertia response, however a plain JSON response was received. This is the controller public function showMineralTransactions(Request $request, $id) { $mineralTransactions = Mine

anonymouse703's avatar
anonymouse703's avatar anonymouse...2yrs agoVue
2
1
Last reply by anonymouse703 2yrs ago
david19's avatar

Paginate(1) Performance

Hello Team, I have a usecase. I will show only 1 Post to the user, with simplePaginate(1). But the problem is, if the user click next Page, Livewire make a Request to the database, over and over again. I checked in the dev tools, its 9kb every request. My question: Should i save the Post Collection in a session before? Or should i load all data without pagination, and use Alpin

david19's avatar
david19's avatar david192yrs agoLivewire
13
1
Last reply by david19 2yrs ago
vincent15000's avatar

PWA application and back button on the smartphone

Hello, I have created a PWA application with Livewire 3 (previously with Livewire 2) and it works pretty fine. The application is for sharing recipes with my friends. I can display the list of my recipes, I click on a recipe to display a recipe and I have a button to go back to the recipes list. My son is used to use the back button of his smartphone instead of any back button

vincent15000's avatar
vincent15000's avatar sbakirov2yrs agoLivewire
4
1
Last reply by sbakirov 2yrs ago
danc81's avatar

Apply global scope to Scout search

Is there a way to apply a global scope to a Scout search? I have a simple where scope which filters results based on the current user ID: public function apply(Builder $builder, Model $model): void { $builder->where('user_id', $this->user->id); } This is applied via middleware like Item::addGlobalScope(new UserScope(auth()->user())); however, the scope is appli

danc81's avatar
danc81's avatar danc812yrs agoLaravel
0
1
bennajah's avatar

Locale Prefix in routes Error

There are some issues that arise when utilizing the Mcamara LaravelLocalization package: First Issue: When switching to another language and subsequently clicking on pagination links, certain bugs become evident. Second Issue: The second bug is observed when using the lazy loading feature within a component. This bug manifests specifically when switching to another language. th

bennajah's avatar
bennajah's avatar bennajah2yrs agoLivewire
0
1
roseriyadh's avatar

Remove Eloquent Limit off queries

Good day, I have a list of users that are total of 4000, and all of them i need to return them in pagination with few where clause and other filters, what I'm experiencing is the total in the pagination is 500 only and i don't know how to remove this limit for good. Can you guys help me?

roseriyadh's avatar
roseriyadh's avatar roseriyadh2yrs agoEloquent
4
2
Last reply by roseriyadh 2yrs ago
phayes0289's avatar

I want to search Search Results without Reloading page

I have a working Livewire component that displays the shortcuts from a Shortcut model. I have a search input and button in the component view that filters the returned results when the search button is clicked. The problem is that the page reloads in order to display the filtered results. How can I get the page to update the filtered results when the search button is press

phayes0289's avatar
phayes0289's avatar vincent150...2yrs agoLivewire
1
1
Last reply by vincent15000 2yrs ago
ahmeda's avatar

How to sort by multi columns with cursorPaginate

I have this code: $products = OrderProduct::query() ->with([ 'product' => function ($query) { $query->select('id', 'title', 'price'); }, 'order' => function ($query) { $query->paid(); } ]) ->selectRaw(' pr

ahmeda's avatar
ahmeda's avatar Niush2yrs agoLaravel
1
2
Last reply by Niush 2yrs ago
thkafadaris1's avatar

Laravel Infinite Scroll using AJAX and livewire component

Hello, I have implemented a Laravel pagination according to the below way of implementation. public function index(Request $request) { $posts = Post::paginate(10); if ($request->ajax()) { $view = view('data', compact('posts'))->render(); return response()->json(['html' => $view]); } return view('p

thkafadaris1's avatar
thkafadaris1's avatar Snapey2yrs agoLivewire
5
4
Last reply by Snapey 2yrs ago
Brand3000's avatar

Perfect redirects

Hello everybody! I'm wondering if someone already has a realization of comprehensive redirects to the index after creating or updating a resource for different scenarios considering pagination. relations, etc.?

Brand3000's avatar
Brand3000's avatar NoLAstNamE2yrs agoNova
12
1
Last reply by NoLAstNamE 2yrs ago
Russelmhardy's avatar

Getting 'All Inertia requests must receive a valid Inertia response' error when paginating with data from an API in Inertia.js

I'm working on a project using Inertia.js and Vue.js. I have implemented pagination in my Vue component and fetching paginated data from an external API. However, when I click on the "Next" button to navigate to the next page, I receive the following error message: "All Inertia requests must receive a valid Inertia response, however a plain JSON response was rece

Russelmhardy's avatar
Russelmhardy's avatar Russelmhar...2yrs agoInertia
0
1
Dave Wize's avatar

groupBy a manyToMany relation on the relationship method

My pivot table contains extra data I need and therefore I cannot do a unique index on the pivot table and I have duplicated rows which means that it returns duplicated data I tried solving it by doing a distinct() call like this public function charges(): BelongsToMany { return $this->belongsToMany( AccountAdvertisementCharges::class,

Dave Wize's avatar
Dave Wize's avatar Dave Wize2yrs agoEloquent
2
1
Last reply by Dave Wize 2yrs ago
enadabuzaid's avatar

I want to make a list datatable without package

I have this Routs : Route::get('subscribed', [SubscribeController::class, 'index'])->name('subscribed.index'); Route::get('subscribed/get-data', [SubscribeController::class, 'getDataTable'])->name('subscribed.get_data'); and this index in controller : public function index() { return view('backend.subscribe.index'); } public funct

enadabuzaid's avatar
enadabuzaid's avatar enadabuzai...2yrs agoLaravel
2
1
Last reply by enadabuzaid 2yrs ago
pshitote's avatar

How can I use custom length aware paginator to modify posts->links() in my view blade?

I have an index page with {{ $posts->links() }} by default that renders navigation page links in my view template. My controller looks like this: public function index(){ return view('postcards.index', [ 'posts' => Postcard::paginate(20) ]); } What this does is that it renders navigation links in my view template such that when I click on 1, my url changes to http://loca

pshitote's avatar
pshitote's avatar Snapey2yrs agoLaravel
8
2
Last reply by Snapey 2yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.