Question

Laravel 4.1, PHP 5.4

My route looks like this:

Route::get('maps', function(){
    dd(Input::all());
});

The URL I load in the browser is this:

http://ag-aus.dev/maps?type=ctf

I'm expecting to get the value of "type" which is "ctf".

But the response I get is this:

array(0) {
}

I'm sure this used to work, but I have no idea why this is happening.

var_dump($_GET); also returns an empty array.

Was it helpful?

Solution

Nginx config was not setup to pass the queries to laravel.

UPDATE

I was missing the ?$query_string parameter in my nginx site config file.

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

Source: http://laravel.com/docs/4.2/installation#pretty-urls

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top