0
我正在重新编写我的网站并转移到Laravel,但由于某种原因,我无法弄清楚如何拥有将您重定向到配置文件页面的搜索表单。Laravel 5表单提交到查看
<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}', '[email protected]');
其作品,但我需要的形式做同样的事情。 是否可以使用默认的laravel 5.4.3来做到这一点,或者我需要像https://laravelcollective.com/docs/5.3/html这样的东西吗?
public function searchForm(){ return view('search'); } 需要是刀片视图吗? – Callahan
我有在顶部的导航栏中的HTML搜索条码,在旧的网站上,我只是提交发布数据到页面,然后检查是否发送了数据并将它们重定向到那里 – Callahan
有没有必要使用刀片。该文件可能只是.php,并会正常工作。对,所以这些代码适合你? –