Request get method route handling

Viewed 33

I am using laravel 5 . I want to set route like

http://localhost:8000/website/product-search-data?term=k

I also tried with

Route::get('/website/product-search-data/*', 'websiteController@searchProductList');
public function searchProductList($term)
{
    dd($term);
 }

But its providing me Sorry, the page you are looking for could not be found. How can I handle and get parameer value ?

1 Answers

Maybe can try this instead:

Route::get('/website/product-search-data/{term}', 'websiteController@searchProductList');

public function searchProductList($term) {
    dd($term);
}
Related