2

我正在尝试创建一个带有组件选项的画廊插件,以选择要显示的画廊。如何使下拉菜单成为多个选定选项,而不仅仅是一个。

前任:

<select multiple>
    ...
</select>

图库组件:

public function defineProperties() {
    return [
        'gallery' => [
            'title'        => 'Galleries',
            'description'  => 'Select which gallery to display',
            'type'         => 'dropdown'
        ]
    ];
}


public function getGalleryOptions(){
    return Galleries::select('id', 'name')->orderBy('name')->get()->lists('name', 'id');
}

任何帮助将非常感激。

4

0 回答 0