1
Laravel GET方法,我在Laravel创建表单:搜索
<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>
,现在当我尝试提交,我得到:
http://localhost:8888/redeem?key=NBtGJ5pZls&search=
但我需要得到公正:
http://localhost:8888/redeem/NBtGJ5pZls
也在路线我有:
Route::get('/redeem/{key}', '[email protected]');
如何使用我的表单重定向到兑换/ NBtGJ5pZls?
谢谢,我更喜欢1.解决方案 –