How to implement the most efficient database search method in Laravel's Inertia/Vue
<p>I want to search the customer list and change the component as is. </p>
<p>I am currently searching for a specific customer using this link /customer/$searchColumn/$searchTerm?page=4</p>
<p>This is what my controller returns</p>
<pre class="brush:php;toolbar:false;">return Inertia::render('Dashboard', [
'customers' => Customer::whereLike("nr", (string)$request)->paginate(10),
]);</pre>
<p>Renders a paginated table of all found items. </p>
<p>Vue is currently very simple:</p>
<pre class="brush:php;toolbar:false;">
<pre class="snippet-code-html lang-html prettyprint-override"><code><script setup>
import { usePage } from '@inertiajs/vue3'
import Pagination from '@/mycompany/Pagination.vue';
const page = usePage()
</script></code></pre>
<code>
</code></pre>
<p>On the front end, I render a table using:</p>
<pre class="brush:php;toolbar:false;">
<pre class="snippet-code-js lang-js prettyprint-override"><code>v-for="customer in $page.props.customers.data"</code></pre>
<code>
</code></pre>
<p>I want a search box at the top of the table that reloads the results as I type. </p>
<p>I don't know where to start. </p>