Home

Awesome

<h1 align="center">𝑳𝒂𝒓𝒂𝒗𝒆𝒍-π‘¨π’…π’Žπ’Šπ’ 𝒔𝒆𝒍𝒆𝒄𝒕2 π’‚π’”π’šπ’π’„π’‰π’“π’π’π’π’–π’” π’†π’™π’•π’†π’π’”π’Šπ’π’</h1> <div align="center">

travis.svg version.svg issues-open.svg install-count.svg license.svg

</div>

*. 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

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

paypal

LICENSE

Open source under MIT LICENSE.