嗨,我正在關注如何設置搜索表單的教程,但我得到一個route
錯誤(NotFoundHttpException
)。Laravel搜索表單中的無效路由
形式
{!! Form::open(['method'=>'GET' ,'url' => 'search', 'class'=>'form-group main-form', 'id'=>'search-form', 'role'=>'form']) !!}
{{ csrf_field() }}
<div style="display:none"><input name="utf8" type="hidden" value="✓"></div>
<input class="form-group main-form" id="q_objname_en_cont" name="searchKey" placeholder='Search by Job title' required="required" style="height:40px;width:60%" type="search">
<input class="btn btn-warning" type="submit" value="Search">
{!! Form::close() !!}
路線
URL(瀏覽器)
http://localhost:8000/search?_token=LJpgN3AwCFoDElOkFsSOX8BBLU1IFOzMvUYiokQj&utf8=%E2%9C%93&searchKey=quia