PHPackages                             xiaohuilam/laravel-admin-select2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. xiaohuilam/laravel-admin-select2

Abandoned → [dcat/laravel-admin](/?search=dcat%2Flaravel-admin)ArchivedLibrary[Admin Panels](/categories/admin)

xiaohuilam/laravel-admin-select2
================================

Laravel-admin select2

v1.2.7(5y ago)422.5k4[3 issues](https://github.com/xiaohuilam/laravel-admin-select2/issues)MITPHP

Since Apr 6Pushed 4y ago2 watchersCompare

[ Source](https://github.com/xiaohuilam/laravel-admin-select2)[ Packagist](https://packagist.org/packages/xiaohuilam/laravel-admin-select2)[ Docs](https://github.com/xiaohuilam/laravel-admin-select2)[ Fund](https://www.paypal.me/laravel)[ RSS](/packages/xiaohuilam-laravel-admin-select2/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (10)Dependencies (6)Versions (29)Used By (0)

𝑳𝒂𝒓𝒂𝒗𝒆𝒍-𝑨𝒅𝒎𝒊𝒏 𝒔𝒆𝒍𝒆𝒄𝒕2 𝒂𝒔𝒚𝒏𝒄𝒉𝒓𝒐𝒏𝒐𝒖𝒔 𝒆𝒙𝒕𝒆𝒏𝒔𝒊𝒐𝒏
============================================

[](#𝑳𝒂𝒓𝒂𝒗𝒆𝒍-𝑨𝒅𝒎𝒊𝒏-𝒔𝒆𝒍𝒆𝒄𝒕2-𝒂𝒔𝒚𝒏𝒄𝒉𝒓𝒐𝒏𝒐𝒖𝒔-𝒆𝒙𝒕𝒆𝒏𝒔𝒊𝒐𝒏)

[![travis.svg](https://camo.githubusercontent.com/324ed497420075def474f70963799ea32dab1c7d48fb750a94c3de124e887b8a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7869616f6875696c616d2f6c61726176656c2d61646d696e2d73656c656374322f6d61737465722e737667)](https://travis-ci.org/xiaohuilam/laravel-admin-select2)[![version.svg](https://camo.githubusercontent.com/d6de39ba935b506dcadd5708dd588b20ae0c7679abb68c76dab93deae7100863/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f7869616f6875696c616d2f6c61726176656c2d61646d696e2d73656c656374322e737667)](https://packagist.org/packages/xiaohuilam/laravel-admin-select2)[![issues-open.svg](https://camo.githubusercontent.com/5998aada15a61592021f553c6eed405e7b483e1a7ade516491eca2581917434c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7869616f6875696c616d2f6c61726176656c2d61646d696e2d73656c656374322e737667)](https://github.com/xiaohuilam/laravel-admin-select2/issues)[![install-count.svg](https://camo.githubusercontent.com/3576fa38b6a194d7bde5d63b1bfc4e2d8b7a6c414045a5412aad811d3f8e952f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7869616f6875696c616d2f6c61726176656c2d61646d696e2d73656c656374322e737667)](https://packagist.org/packages/xiaohuilam/laravel-admin-select2)[![license.svg](https://camo.githubusercontent.com/9747a378839de528e56c30a74bf7761d2eb39467a0a1a83a80f63f0cbcf1d738/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7869616f6875696c616d2f6c61726176656c2d61646d696e2d73656c656374322e737667)](LICENSE)

\*. Deprecated, please use [dcat/laravel-admin](https://github.com/jqhph/dcat-admin) instead!

About
-----

[](#about)

中文用户请阅读 [中文文档](README_cn.md).

A asynchronous extension to implements select2 to [laravel-admin](http://github.com/z-song/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
------------

[](#installation)

```
composer require xiaohuilam/laravel-admin-select2
```

publish assets

```
php artisan vendor:publish --tag=laravel-admin-select2
```

Usage
-----

[](#usage)

- [asynchronous single select (`select`) demo](tests/Controllers/AnswerController.php#L35-L59)
- [asynchronous multiple select (`multipleSelect`) demo](tests/Controllers/QuestionController.php#L35-L59)
- [asynchronous morph select (`morphSelect`) demo](tests/Controllers/CommentController.php#L34-L51)
- [asynchronous select filter (`filterSelect2`) demo](tests/Controllers/AnswerController.php#L68-L77)

Structure
---------

[](#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
--------

[](#donation)

[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.me/laravel)

LICENSE
-------

[](#license)

Open source under [MIT](LICENSE) LICENSE.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~106 days

Total

27

Last Release

2059d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e66e746f168551b6b3d2a83b594105b78a43bff3646730f15725fd7b515eaff3?d=identicon)[xiaohuilam](/maintainers/xiaohuilam)

---

Top Contributors

[![xiaohuilam](https://avatars.githubusercontent.com/u/6964962?v=4)](https://github.com/xiaohuilam "xiaohuilam (149 commits)")[![nantmpeter](https://avatars.githubusercontent.com/u/4340021?v=4)](https://github.com/nantmpeter "nantmpeter (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

laravellaravel-adminlaravel-admin-extensionphpselect2laravel-adminselect2laravel admin extensionmorph select

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xiaohuilam-laravel-admin-select2/health.svg)

```
[![Health](https://phpackages.com/badges/xiaohuilam-laravel-admin-select2/health.svg)](https://phpackages.com/packages/xiaohuilam-laravel-admin-select2)
```

###  Alternatives

[laravel-admin-ext/wang-editor

wangEditor extension for laravel-admin

6285.4k](/packages/laravel-admin-ext-wang-editor)[jxlwqq/composer-viewer

Composer Viewer for Laravel-admin

2713.0k](/packages/jxlwqq-composer-viewer)[jadekun/sku

382.2k](/packages/jadekun-sku)[sharemant/laravel-admin-ext-editormd

EditorMd(V.1.5.0) for laravel-admin.

177.1k](/packages/sharemant-laravel-admin-ext-editormd)[jonexyz/wang-editor-v4

laravel admin editor

161.4k](/packages/jonexyz-wang-editor-v4)[mwz747512353/laravel-admin-echarts

141.7k](/packages/mwz747512353-laravel-admin-echarts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
