I am making a request for a route, where the request method is marked with Any
- that is, it accepts any method.
public function anyIndex()
{
$nome = Input::get('nome');
$id = Input::get('id'); // Queria específico do 'GET', não qualquer um
}
URL:
'usuarios/index?nome=Wallace+Souza&id=Teste'
The problem is that in Laravel
, the Input::get
method is for everything ( POST
, PUT
, GET
). And in this specific case, I want to get only the value of the query string.
That is, if I fill in the field id
on the form, and send a request POST
, I still want to get only what is passed in url
via GET
.
Can you do this in Laravel
?