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

techmarketing's avatar

GET request includes question mark as part of parameter name.

Hi there,

After entering this URL on the browser /integration/settings/3?company_id=4 (GET request)

I did a dd($request->all());

This is the output: http://prntscr.com/flw5zp

Does anybody knows why the question mark is part of the parameter name?

array:1 [

"?company_id" => "4"

]

Thanks in advance.

0 likes
2 replies
ieuan's avatar

Don't know if this is of any help now, but I had the same problem and it frustrated me for a long time. So maybe this can help someone.

The problem for me turned out to be the configuration of the nginx server I was using.

Checking the docs https://laravel.com/docs/5.6/deployment#server-configuration

I saw that I needed to change the Location line from

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

to

  location / {
    try_files $uri /index.php?$query_string;
  }
1 like
xunam's avatar

Had this issue,

by debugging ./vendor/laravel/framework/src/Illuminate/Routing/Middleware/ValidateSignature.php i noticed that query was empty and changing nginx config from

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

to

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

fixed the issue

Please or to participate in this conversation.