这是我的代码: p>
控制器文件:EmergencyContactsController.php p>
$ surnames = DB :: table('salutations') - > pluck('name');
return view('patient / emergencycontacts',['salutation'=> $ surnames]);
code> pre>
刀片文件:patient / emergencycontacts.blade.php < / p>
{!! Form :: open(array('route'=&gt;'emergencycontacts_store','class'=&gt;'form'))!!}
&lt; div class =“form-group”&gt;
{!! Form :: label('Salutation')!!}
{{Form :: select('role',[''=&gt;'Select Role'] + $ salutation,null,['class'=&gt;' form-control'])}}
&lt; / div&gt;
&lt; div class =“form-group”&gt;
{!! Form :: label('First Name')!!}
{!! Form :: text('firstname',null,array('required','class'=&gt;'form-control','placeholder'=&gt;'First Name'))!!}
&lt; / div&gt;
&lt; div class =“form-group”&gt;
{!! Form :: label('姓氏')!!}
{!! Form :: text('lastname',null,array('required','class'=&gt;'form-control','placeholder'=&gt;'姓氏'))!!}
&lt; / div&gt;
&lt; div class =“form-group”&gt;
{!! Form :: label('Relationship')!!}
{{Form :: select('relationship',['Father','Mother','Husband','Wife','Son','Daughter', '叔叔','阿姨','其他'])}}
&lt; / div&gt;
&lt; div class =“form-group”&gt;
{!! Form :: label('Phone')!!}
{!! Form :: text('phone',null,array('required','class'=&gt;'form-control','placeholder'=&gt;'Phone'))!!}
&lt; / div&gt; \ n&lt; div class =“form-group”&gt;
{!! Form :: label('Fax')!!}
{!! Form :: text('fax',null,array('class'=&gt;'form-control','placeholder'=&gt;'Fax'))!!}
&lt; / div&gt;
&lt; div class = “形式的基团” &GT; \ N {! Form :: submit('save',array('class'=&gt;'btn btn-primary'))!!}
&lt; / div&gt;
{{Form :: close()}}
代码> pre>
当我去网址时 http:// localhost:8000 / patient / emergency-contacts / create 它给了我错误: p>
“不支持的操作数类型” p>
blockquote >
div>