htmlentities()期望参数1为字符串,给定数组 [英] htmlentities() expects parameter 1 to be string, array given

查看:461
本文介绍了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')) }}

这篇关于htmlentities()期望参数1为字符串,给定数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆