I want to dynamically query using dynamic values from form inputs
My form looks like this
<form action="{{url('search')}} method="post">
<input name="min" type="number">
<input name="max" type="number">
<button type="submit">Submit</button>
Routes
Route::post('search', 'SearchController@search');
Action
public function search($min, $max)
{
$max = //this should from form
$min= //this should from form
$result = $this->users->showResultByAgeMinMax($max,$min);//some code for repository
}
How whould I pass data from form as values for min, max as parameters?
$min = 15;//works
$max = 100;//works//
But I want this dynamically populated from form by a user
<input name="_token" type="hidden" value="{{ csrf_token() }}">