我有一个laravel表单,它使用输入数组,输入元素的结构如下:
{{ Form::text('parent_firstName[]', '', array('class' => 'form-control', 'placeholder' => 'first name') ) }}
在我的商店方法中,如果验证没有通过,我想做一些数据验证并重定向。我的redirect语句使用带有输入的back方法:
return Redirect::route('registration.create')
->withInput();
当我这样做时,我收到错误:
htmlentities()期望参数1为字符串,给定数组(查看:/var/www/app/views/registration/create.blade.php)
当我阅读文档时,看起来这是使用输入重定向的正确方法,因此它会填充输入数据。
如果我注释掉->withInput()
我没有错误。
有关它为何抛出错误的任何想法?