Falling in a Dot

After many hours debugging a Laravel application, I've found the issue.

The Request object handles input arrays using a so called "dot notation", to permit you to directly access structured informations in the form of

$name = $request->input('products.0.name');

That's really cool. Until you don't give a fuck to arrays direct access, but indeed you need variables containing a dot in the name in your POSTed data. Those will be silently replaced with underscores, and you will spend a whole evening trying to give a sense to that mess.

I've not found any way to disable this "feature", so my dots in POSTed variables' names are still replaced with underscores. I have to rewrite some code all around...

Show Comments