1

I've upgraded From L4.2 to L5.3.20 and I've tried to use with Collective-laravel FormFacades and HTMLFacade with below code but I got the errors result in my drop down. how should I correct it

{{ Form::select('employeeID', $employees,null,['class' => 'form-control input-xlarge select2me','data-placeholder'=>'Select Employee...']) }}


'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,

Result:

{"id":25,"employeeID":"asdfasdfasdf","fullName":"Sdfas","email":"ddd@yahoo.com","gender":"female","fatherName":"Dfasdfasdf","mobileNumber":"3452345","date_of_birth":"2016-10-11","designation":1,"joiningDate":"2016-10-31","profileImage":"Sdfas_asdfasdfasdf.png","localAddress":"234523","permanentAddress":"452345","status":null,"last_login":null,"remember_token":null,"exit_date":null,"created_at":"2016-10-27 02:21:56","updated_at":"2016-10-27 02:21:56"}
DMS-KH
  • 2,669
  • 8
  • 43
  • 73

1 Answers1

0

You need to give well formatted data to select. Laravel has pluck() method which is perfect for this job:

$employees = Employee::pluck('employeeID', 'id');
Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279