How To Pass GET Parameters To Laravel From With GET Method ?

后端 未结 7 896
余生分开走
余生分开走 2020-11-30 02:05

i\'m stuck at this very basic form, that i could not accomplish, which i want to build a search form with an text input, and two select controls, with a route that accept 3

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 02:16

    I had same problem. I need show url for a search engine

    I use two routes like this

    Route::get('buscar/{nom}', 'FrontController@buscarPrd');
    
    Route::post('buscar', function(){
    
       $bsqd = Input::get('nom');    
    
       return Redirect::action('FrontController@buscarPrd', array('nom'=>$bsqd));
    
    });
    

    First one used to show url like we want

    Second one used by form and redirect to first one

提交回复
热议问题