Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MirasMustimuly's avatar

Inertia query params are empty on the backend

Hi guys!

I am using Inertia with vue 3. And it works ok locally. But on production I am unable to read query params on my laravel backend. $_GET is empty. Can't figure out what is wrong. I'd appreciate any help.

I am making get requsests via Link and Inertia.get method. I am able to see query params in browser address bar, and also see them in console. But on the backend $_GET is empty.

laravel and inertia latest versions

0 likes
3 replies
frankielee's avatar

Since you are using Laravel as backend, have you tried using these methods?

//Helper
dd(request()->all());

//Illuminate\Http\Request

dd($request->all());

Ref: https://laravel.com/docs/9.x/requests#retrieving-input

If you are using apache2 as webserver, please make sure the .htaccess is working fine and required modules are enabled, like rewrite etc.

1 like
MirasMustimuly's avatar

Thank you guys! As @sinnbeck suggested the problem was with my nginx config. The config was written like this:

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

I needed to add ?$args after index.php like that

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

Thank you @frankielee too!

Please or to participate in this conversation.