Ich schaffe Form in Laravel:Laravel GET-Methode für die Suche
<form action="/redeem" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="key" class="form-control" placeholder="ENTER VOUCHER CODE">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
und jetzt, wenn ich versuche zu tragen vor, die ich erhalten:
http://localhost:8888/redeem?key=NBtGJ5pZls&search=
aber ich brauche nur zu bekommen:
http://localhost:8888/redeem/NBtGJ5pZls
auch in Route Ich habe:
Route::get('/redeem/{key}', '[email protected]');
Wie wird umgeleitet, um/NBtGJ5pZls mit meinem Formular einzulösen?
danke, ich bevorzuge 1. Lösung –