【发布时间】:2017-04-18 03:03:52
【问题描述】:
我正在重新编写我的网站并转移到 Laravel,但由于某种原因,我无法弄清楚如何使用搜索表单将您重定向到个人资料页面。
<form class="navbar-form navbar-right search" role="search" action="/profile/" method="GET">
<div class="input-group">
<input type="text" class="form-control navbar-player-search" placeholder="Enter IGN here" autocomplete="off" required>
<div class="input-group-btn">
<button type="submit" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>
如果我访问 example.com/profile/Callahan,我已经设置了一条有效的路线
Route::get('/profile/{Profile}', 'PlayerController@getStats');
但我需要表格来做同样的事情。 是否可以使用默认的 laravel 5.4.3 来做到这一点,或者我需要像 https://laravelcollective.com/docs/5.3/html 这样的东西吗?
【问题讨论】: