如何清除URL搜索laravel?

时间:2018-06-28 17:04:16

标签: laravel-5

  1. 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>
    
  2. 路线

     Route::get('search', ['as' => 'getSearch', 'uses' => 'SearchController@getSearch']);
    

搜索时,URL结果如下

     http://www.example.com/search?search=keyword

如何将网址转换为

     http://www.example.com/search/keyword

0 个答案:

没有答案