【发布时间】:2017-09-23 08:45:30
【问题描述】:
我的blade.php代码是:
{!! Form::input('text', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
HtmlBuilder.php 代码是
public function escapeAll($value)
{
return htmlentities($value, ENT_QUOTES, 'UTF-8');
}
错误信息是:
ErrorException in HtmlBuilder.php line 65:
htmlentities() expects parameter 1 to be string, array given (View: /home/seyali-02/dev/htdocs/scam/resources/views/dashboard/Scam/edit.blade.php)
我已经改变了blade.php
{!! Form::input('text','', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
和
{!! Form::text('name', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
还有text('text', .. 但是对我来说没有任何效果,并且会抛出与我上面提到的相同的错误.. 我已经解决了与此相关的所有类似问题,但这些答案都没有解决我的问题。所以请避免重复这个问题,给我清晰正确的解决方案..
【问题讨论】:
-
$value 变量的值是多少?如我所见,这是一个数组。你能告诉我们 var_dump($value) 吗?
标签: php html laravel laravel-5