htmlentities()期望参数1为字符串,给定数组
问题描述:
我正在尝试将一个类添加到laravel表单中.根据需要将数组作为第三个参数传递,但出现上述错误.
I'm trying to add a class to a laravel form. The array is being passed as the third argument, as required, but I get the above error.
{{ Form::input('text', $variable->name, array('class' => 'form-control')) }}
如果我摆脱了第三个参数,该窗体将按预期显示(未设置样式).我在这里看不到我在做什么错-有人可以帮忙吗?
If I get rid of the third argument, the form displays as expected (unstyled). I can't see what I'm doing wrong here - can anyone help?
答
{{ Form::text('text', $variable->name, array('class' => 'form-control')) }}