Laravel 5.4上不支持的操作数类型

How can I solve this on Laravel 5.4?

{!! Form::select('kecama',
      [''=>'--- Pilih Kecamatan ---'] + $kecamamatans,
      '',
      array(
        'class'=>'form-control',
        'id'=>'kecama'
      )
    );
!!}

thank you.

Seems like you only pluck $kecamamatans in your controller before passing to view. In that case you need to use toArray()

Try this:

{!! Form::select(
      'kecama', 
      [''=>'--- Pilih Kecamatan ---'] + $kecamamatans->toArray(),
      '',
      array('class' => 'form-control', 'id' => 'kecama')
    );
!!}

And change your controller code like below:

public function myform() 
{ 
    $kecamatans = DB::table('kecamatans')->pluck("nama_kecamatan", "id_kecamata‌​n"); 
    return view('register', compact('kecamatans')); 
}

in your Controller inside the create and edit make sure to have the following:

$person= Kecamatans::pluck("nama_kecamatan","id_kecamata‌​n");

I had face the same issue but the answer save my life is Unsupported operand types in laravel 5.4 Your question is similar with the above link.

My problem was that i was trying to merge the array value with undefined variable.

Please check & confirm you your are trying to merge the array variables or these are having different.

I had seen in your comment that you had passed the variable kecamatans and tring to merge with variable $kecamamatans both are looks different variable that's why it causing the issue.