pagina">
I want to search the customer list and change the component as is.
I am currently searching for a specific customer using this link /customer/$searchColumn/$searchTerm?page=4
This is what my controller returns
return Inertia::render('Dashboard', [ 'customers' => Customer::whereLike("nr", (string)$request)->paginate(10), ]);
Renders a paginated table of all found items.
Vue is currently very simple:
On the front end, I render a table using:
v-for="customer in $page.props.customers.data"
I want a search box at the top of the table that reloads the results as I type.
I don't know where to start.
For this case, you can use regular ajax/fetch requests to complete.
Inertia still utilizes laravel for routing, so it's impossible to complete this kind of form request without some kind of request or redirect.
Even the creator of
inertia.js
supports usingxhr/fetch requests with inertia.