phplaravel-5

Laravel GET parameters that include dots cannot be checked


I'm trying to determine whether a parameter is in the URL or not. I use:

$request->has('key');

And it's been working properly until now when I have to check wethere I have openid.ns parameter in the URL. If I remove the .(dot) everything works as expected, but:

URL: myhost.dev/auth/login?openid.ns=http://google.bg/

And then

dd($request->has('openid.ns');

returns false.

If it's something like this:

URL: myhost.dev/auth/login?openidns=http://google.bg/

And then

dd($request->has('openidns');

returns true.

What causes this odd behavior?


Solution

  • To determine if the openid.ns value is present on the request, you can do it by:

    $request->has('openid_ns')