Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Select2 Laravel Package

public-repo/select2

A Laravel package for integrating Select2 dropdowns into your forms, with helpers for AJAX-loaded options, model binding, and searchable selects. Quickly add rich, user-friendly select inputs without wiring up JavaScript yourself.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Back-office form UX roadmap. The underlying user problem is real and roadmap-worthy: entity-selection fields (assign users, owners, categories, related records) that render thousands of <option> elements make admin screens slow and hard to use. This package demonstrates the expected solution — a searchable, AJAX-backed typeahead with model binding, old-input handling, multi-select, and localization — which is the shape most teams want regardless of framework. It supports a "fix existing forms" decision over a larger form-layer rewrite.
  • Build vs. buy on a common UI primitive. A typeahead/autocomplete field is table-stakes. This package looks like a "buy/adopt" candidate, but the diligence kills it: 0 stars, 0 dependents, no releases, an unattributed fork, and — critically — a framework mismatch (see below). So this decision resolves not to "buy" but to "build a thin native solution," which the package's own feature set scopes precisely: a JSON search endpoint plus a small JS initialiser with debounce, minimum input length, result caps, and a {results:[{id,text}]} payload. That is days of work, not a quarter.
  • Framework-fit diligence as a gate. The package is submitted as a Laravel package but the evidence shows it is a Symfony bundle (fork of select2entity-bundle, built on Symfony's bundle system, DI extensions, and form types). For a Laravel roadmap item this is disqualifying on architecture fit alone. This supports a standing product decision to require framework/ownership metadata verification before any dependency enters scope — the description itself is unreliable, which is a signal about dependency quality.
  • Feature scoping inputs. The listed capabilities (remote data, multiple selection, tags/placeholders, clear controls, localization) map directly onto backlog items for a "searchable select" component. Use them as the acceptance criteria for the native build, and use the Select2 AJAX contract as the reference for the endpoint the front end calls.

When to Consider This Package

Adopt only under narrow, explicit conditions:

  • You are on Symfony 7.0 / PHP 8.0+ (not Laravel), you already rely on the select2entity-bundle pattern, and you need a stopgap to keep that form field working.
  • Your forms use large Doctrine entity sets where a plain EntityType dropdown is a measured performance problem, and you want a drop-in AJAX autocomplete.
  • You accept that you are owning a near-abandoned fork: mirror the repo internally, pin a commit SHA, name an owner, and schedule review at each Symfony minor.

Look elsewhere when:

  • You are on Laravel. This is the wrong framework entirely — there is no bundle registry or form-type extension point. Do not adopt; build natively (Eloquent-backed search endpoint plus a modern JS component such as Tom Select, or Filament's built-in searchable relation fields).
  • You need a maintained, well-adopted dependency with vendor support, security review, or an SLA — a zero-adoption fork provides none of these.
  • Your option sets are small enough that a standard dropdown works; the JS/AJAX complexity isn't justified.
  • A first-party alternative fits your UX bar — for Symfony, Symfony UX Autocomplete or EntityType + Tom Select removes the fork and is maintained; prefer these if they clear the bar (they likely do).

How to Pitch It (Stakeholders)

To executives: The problem is worth funding — large entity dropdowns degrade admin usability and page performance, and a search-as-you-type field fixes it. The package is not worth adopting: it is an unmaintained, zero-adoption fork that is mislabeled as a Laravel package when it targets Symfony. Recommended position: fund a small native implementation of the same interaction pattern (a search endpoint plus a lightweight JS component) within the existing stack. Effort is days, risk is minimal, and we avoid inheriting an orphan dependency and a second framework. No procurement, no license review, no vendor relationship needed.

To engineering: Treat this as a reference implementation of the UX pattern, not a dependency. The valuable, reusable parts are the interaction contract — a debounced, minimum-length-gated AJAX search returning {results:[{id,text}]}, drop-in replacement behavior for standard entity fields, multi-select and clear controls, and old-input/model binding semantics. Implement it natively: thin, authenticated, paginated controller endpoints; an indexed search column to avoid LIKE '%term%' table scans; and a modern JS select component. If a Symfony 7 team genuinely needs the bridge, vend the fork with an internal mirror and a pinned SHA, but benchmark Symfony UX Autocomplete first and expect to replace it — the fork's only reason to exist disappears once upstream catches up.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager