I have set a route in my Laravel project, if it was with href I would have done it like this but now I want to pass in the form data as the $country_from
and $country_to
please how can I do this
<form action="">
@csrf
<input type="text"
class="search-form flexdatalist"
name="origin"
placeholder="country_from"
data-search-in='name'
data-min-length='1'
/>
<img src="" class="search-icon origin" width="28px" height="21px"/>
</div>
<div class=" col-md-3 mx-0 px-0">
<input type="text"
class="search-form flexdatalist"
name="country_to"
data-search-in='name'
data-min-length='1'
placeholder="Travelling to"
/>
<img src="" class="search-icon destination" width="28px" height="21px"/>
</div>
<div class="col-md-3 mx-0 px-0">
<input type="text"
class="search-form flexdatalist"
name="residence"
data-search-in='name'
data-min-length='1'
placeholder="Residing In"
/>
<img src="" class="search-icon residence" width="28px" height="21px"/>
</div>
<div class="col-md-3 px-0">
<input type="submit" value="Search Visas" class="btn btn-primary search-btn"/>
</form>
Route
Route::get('/{country_from}/{country_to}', 'DestinationCountriesController@index')->name('destination');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire