Search.blade.php
<form action="{{url('search')}}" method="get" id="main_search" >
<input type="text" name="search" id="search" placeholder=" Search Movies">
<button type="submit"><i class="fa fa-search" aria-hidden="true"></i></button>
</form>
路线
Route::get('search', ['as' => 'getSearch', 'uses' => 'SearchController@getSearch']);
搜索时,URL结果如下
http://www.example.com/search?search=keyword
如何将网址转换为
http://www.example.com/search/keyword