'How to set filtering in vue template with models listing?
With laravel 9/Inertiajs3 I have crud defined with route
Route::resource('models', ModelController::class)->except(['show']);
and main crud methods in control. I wonder in which way can I to set filtering by some field, like having condition in control :
public function index($filter_name = '')
{
$models= Model
::getByName($filter_name)
->paginate(5);
return Inertia::render('Admins/Models/Index', [
'models' => $models,
]);
}
I suppose I need to add in routes like :
Route::post('models-filter', 'API\Admin\ModelController@index');
But how can I send POST request from vue template with models listing, which has no form defined ?
Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
