Can't you just use the PHP array syntax?
{{Form::text('name[],'',array('class'=>'form-control'))}}
You'll then be able to use the posted input name as an array.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi to all, I have a piece of code that create new form field with the last part of the name that have an id different every time that i create a new form field. My question is how can i access to this field from $request if i know only the first part of the field name?
{{Form::text('name-1','',array('class'=>'form-control'))}} {{Form::text('name-2','',array('class'=>'form-control'))}} {{Form::text('name-4','',array('class'=>'form-control'))}} {{Form::text('name-223','',array('class'=>'form-control'))}}
the number after the name can change a lot and i need to get the name of the fieldName to make a foreach.
Anyone has a solution? Thanks a lot.
Please or to participate in this conversation.