Using multidimensional array input names with Laravel 4.2 Form facade throws error on postback

旧巷老猫 提交于 2019-12-06 15:01:39

That way is not the proper one.

Following one is it

{{ Form::label('customer[0][field_1], 'Customer Field:') }} <br>
{{ Form::text('customer[0][field_2]', null) }}

After that, if you want to duplicate it, you must use

{{ Form::label('customer[1][field_1], 'Customer Field:') }} <br>
{{ Form::text('customer[1][field_2]', null) }}

But if you want just get a simple array, you must use

{{ Form::label('customer[field_1], 'Customer Field:') }} <br>
{{ Form::text('customer[field_2]', null) }}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!