I know how to add dropdown in Laravel, but what about editable dropdown?
{{ Form::select('unit', $units, Input::old('unit'), ['class' => 'form-control'])}}
I know how to add dropdown in Laravel, but what about editable dropdown?
{{ Form::select('unit', $units, Input::old('unit'), ['class' => 'form-control'])}}
Finally, I achieved like this(I am using Laravel 4 now, if you use 5, you should change {{ }} to {!! !!}).
var availableNames = {{ json_encode($itemnames) }};
$("input#name").autocomplete({
source: availableNames,
minLength: 0,
delay: 0
}).focus(function () {
//reset result list's pageindex when focus on
$(this).autocomplete("search");
});