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

Dreamer's avatar

Request input dot notation not working

Hi

I have come across weird thing with Laravel 5.1. I am trying to get checkbox array values out of request element but the way described in Laravel documentation is not working.

I am trying to do this but it is not working:

$request->input('auto.send_invoice')

This however works well:

$request->input("auto.'send_invoice'")

Is this is the way it is supposed to work??

0 likes
2 replies
pmall's avatar
pmall
Best Answer
Level 56

$request->input('auto.send_invoice') matches <input name="auto[send_invoice]">

2 likes
Dreamer's avatar

Right, thanks. That was error from my part. I used quotes at the form input name:

name="auto['create_invoice']"

Please or to participate in this conversation.