My blade.php code is:
{!! Form::input('text', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
HtmlBuilder.php code is
public function escapeAll($value)
{
return htmlentities($value, ENT_QUOTES, 'UTF-8');
}
The error message is:
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)
And i have changed the blade.php as like
{!! Form::input('text','', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
and
{!! Form::text('name', 'tactic[]', null, array('id' => 'tactic', 'class' => ' form-control TabOnEnter', 'placeholder' => 'Tactics_1')) !!}
and also text('text',
.. But nothing works for me and throwing me the same error as i mentioned above.. I have gone through all the similar questions related to this but none of those answers solved my problem . So please avoid doing duplication of this question and give me clear and correct solution..
You are adding tactic[]
to the name which is an array and hence when you post the data it is going as an array. Either remove it or at php end use implode
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments