2
I’m making a request for a route, where the request method is marked with the Any - that is, 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, no Laravel, the method Input::get serves for everything (POST, PUT, GET). And, in this specific case, I want to take only the value of the query string.
That is, if I fill in the field id on the form, and send a request POST, still yes I want to take only what is past in the url via GET.
You can do it in Laravel?
in that case I don’t need to create the options there on the route? type the /{parameter} I quoted? I can leave only the /index that the data will appear in the url without being set in the route and still I will be able to pick up the controller?
– Raylan Soares
@Raylansoares in this case I’m talking about the parameters
GET. Maybe you’re getting confusedpages/15withpages/?id=15. When I speakGETI refer to the last example– Wallace Maxters
Ahh yes, true. Thank you! rs
– Raylan Soares