xiaohuilam / laravel-admin-select2
Laravel-admin select2
Fund package maintenance!
www.paypal.me/laravel
Installs: 2 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 42
Watchers: 3
Forks: 4
Open Issues: 3
Requires
- encore/laravel-admin: >=1.6.0
Requires (Dev)
- fzaninotto/faker: >=1.4
- laravel/browser-kit-testing: >=v4.2.1
- laravel/laravel: <8.0
- phpunit/phpunit: >6.0
- squizlabs/php_codesniffer: >=3.0
This package is auto-updated.
Last update: 2021-08-08 13:25:08 UTC
README
*. Deprecated, please use dcat/laravel-admin instead!
About
中文用户请阅读 中文文档.
A asynchronous extension to implements select2 to laravel-admin, including single select/multiple select/morph select.
It will send ajax query if only you trigger list option in the form.
*. extends from laravel-admin's original select, multipleSelect Fields, so it's compatible with laravel-admin select field.
Installation
composer require xiaohuilam/laravel-admin-select2
publish assets
php artisan vendor:publish --tag=laravel-admin-select2
Usage
- asynchronous single select (
select
) demo - asynchronous multiple select (
multipleSelect
) demo - asynchronous morph select (
morphSelect
) demo - asynchronous select filter (
filterSelect2
) demo
Structure
src
├── Form
│ └── Field
│ ├── Select.php # `LaravelAdminExt\Select2\Form\Field\Select` single select class
│ ├── MultipleSelect.php # `LaravelAdminExt\Select2\Form\Field\MultipleSelect` multiple select class
│ └── MorphSelect.php # `LaravelAdminExt\Select2\Form\Field\MorphSelect` morph select class
├── Interfaces
│ └── MorphSelectInterface.php # `LaravelAdminExt\Select2\Interfaces\MorphSelectInterface` morph select interface. must implement in every morphed models.
├── Select2.php # laravel-admin extension identify file
├── Select2ServiceProvider.php # laravel service provider
└── Traits # some multiplexing methods
├── FormTrait.php
└── Select2Trait.php
Donation
LICENSE
Open source under MIT LICENSE.