insert.blade.php
{!! Form::select('country', ['' => 'Select'] +$countries,'',array('class'=>'form-control','id'=>'country','style'=>'width:350px;'));!!}
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
When i m adding above 'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class, in app.php it give me the following error
Unsupported operand types laravel 5.2
and
When i removed 'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
i m getting class 'Form' not found
代码中的问题是什么? 在哪里编辑代码? 代码中的问题是什么? 在哪里编辑代码? 代码中的问题是什么? 在哪里编辑代码?
答案 0 :(得分:1)
问题是
['' => 'Select'] +$countries
和您的$国家/地区不是数组形式(Eloquent return object)
尝试在视图中添加toArray()或在Controller中添加toArray()
['' => 'Select'] +$countries->toArray()