Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php htmlspecialchars()要求参数1为字符串laravel_Php_Laravel - Fatal编程技术网

Php htmlspecialchars()要求参数1为字符串laravel

Php htmlspecialchars()要求参数1为字符串laravel,php,laravel,Php,Laravel,我是拉雷维尔的新手,我很享受。在处理一个项目时,我遇到了这个错误:helpers.php中的ErrorException 观点: <div class="form-group"> <div class="input-group"> <div class="input-group-addon"> Name</div> {!! Form::text('name',['class'=>'form-control', 'pl

我是拉雷维尔的新手,我很享受。在处理一个项目时,我遇到了这个错误:helpers.php中的ErrorException

观点:

<div class="form-group">


<div class="input-group">


  <div class="input-group-addon"> Name</div>
  {!!      Form::text('name',['class'=>'form-control', 'placeholder'=>'Project Name'])      !!}

 </div>

名称
{!!Form::text('name',['class'=>'Form-control','placeholder'=>'Project-name'])


描述
{!!Form::textarea('desc',['rows'=>'3','cols'=>'3',
'class'=>'form-control','placeholder'=>'description'])

textarea()和text()的第二个值必须是默认值,请尝试以下操作:

Form::textarea('desc', '', ['rows'=>'3'

Form::text('name', '', ['class'=>'form-control'

第二个参数必须是默认值,最佳做法是将该值设置为null,如果字段数据未通过验证,则输入值不会消失

{{ Form::text('first_name', null, array('class' => 'field')) }}
更多关于


有关

的更多信息,那么,您遇到了什么样的错误?@shoshak请尝试此
{!!Form::text('name','',['class'=>'Form-control','placeholder'=>'Project-name'])!!
{{ Form::text('first_name', null, array('class' => 'field')) }}
{{ Form::textarea('notes', null, ['size' => '3x3']) }}