Query via get with Laravel

Asked

Viewed 16 times

0

How do I pass data via get from a form? When I do Submit, the url is meusite.com/pesquisar?termo=algumtermo&categoria=algumacategoria . How I pass these two parameters termo and categoria to the route and send to the controller?

  • puts the controller code pff, even if it has nothing to see how you access request

  • The route I took Route::get('/pesquisar?q={termo}&categoria={categoria}', 'SiteController@pesquisar'); but if I access that route it is not found. There in the controller, I just passed public function pesquisar($termo, $categoria){ return $termo; }

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.