ziffdavis / nova-multiselect
此包已被 放弃 且不再维护。未建议替代包。
Laravel Nova 多选字段。
v0.2.1
2019-10-25 17:04 UTC
Requires
- php: >=7.1.0
- dev-master
- v0.2.1
- v0.2
- v0.1
- dev-dependabot/npm_and_yarn/json-schema-and-jsprim-0.4.0
- dev-dependabot/npm_and_yarn/postcss-and-laravel-mix-8.4.23
- dev-dependabot/npm_and_yarn/ansi-html-and-laravel-mix--removed
- dev-dependabot/npm_and_yarn/set-value-and-union-value-2.0.1
- dev-dependabot/npm_and_yarn/axios-0.27.2
- dev-dependabot/npm_and_yarn/jquery-3.5.0
- dev-dependabot/npm_and_yarn/json5-and-laravel-mix-2.2.3
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/css-what-2.1.3
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/node-sass-4.14.1
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/tar-2.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/ini-1.3.8
- dev-PCX-288
This package is auto-updated.
Last update: 2024-03-30 00:18:59 UTC
README
安装
composer require ziffdavis/nova-multiselect
描述
允许拥有由 Selectize 驱动的 BelongsToMany 关系多选表单字段。此字段在索引页面上隐藏。
用法
public function fields(Request $request)
{
return [
MultiSelect::make('Category', 'categories')->options(\App\Models\Category::get(['id', 'name']))->placeHolder('Select Categories'),
];
}
方法
方法 | 描述 |
---|---|
options($options) |
设置要使用的选项。可以是集合或对象数组 |
placeHolder($text) |
设置用作占位符的文本 |
disabled($bool) |
设置字段是否禁用 |
optionLabel($label) |
设置用作选项标签的属性名称(默认 'name') |
optionValue($value) |
设置用作选项值的属性名称(默认 'id') |