jeudi 28 juin 2018

How to clear url search laravel?

  1. Search.blade.php

        <form action="" 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

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

When doing the search the url results will be as follows

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

how to convert url to

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire