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

后端 未结 7 914
余生分开走
余生分开走 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:40

    Router

    Route::get('search/{id}', ['as' => 'search', 'uses' => 'SearchController@search']);
    

    Controller

    class SearchController extends BaseController {
    
        public function search(Request $request){
    
            $id= $request->id ; // or any params
    
            ...
        }
    }
    

提交回复
热议问题