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
Select2Wire

Select2Wire Laravel Package

josedaian/select2wire

Select2Wire is a Laravel Livewire wrapper for the Select2 dropdown library. It lets you render searchable, AJAX-powered select inputs as Livewire components using simple Blade tags, wire:model binding, and remote data loading, without writing custom JavaScript.

View on GitHub
Deep Wiki
Context7

Select2Wire integrates Select2 with Laravel Livewire, providing a reusable Blade component for searchable, taggable, and AJAX-powered selects without custom JavaScript glue. It keeps selections synchronized with Livewire properties through wire:model, so dropdown changes trigger reactive updates naturally.

  • Drop-in Blade component for Select2
  • Two-way binding via wire:model
  • AJAX/remote data loading support
  • Configurable options, placeholders, and events
  • Built for Livewire component workflows
Frequently asked questions about Select2Wire
What is josedaian/select2wire used for?
Select2Wire is a Laravel Livewire package that integrates Select2 dropdowns into Livewire components. It is intended for searchable, AJAX-powered selects backed by server-side data, helping connect models and queries without custom JavaScript.
How do I install Select2Wire in a Laravel application?
Install it with Composer using the package name josedaian/select2wire, then follow the repository README for any service provider, config publishing, or asset steps. Before upgrading, read the composer.json constraints so you know which Laravel, Livewire, and PHP versions are supported.
Does Select2Wire work with Livewire components?
Yes. Select2Wire is explicitly described as Select2 for Livewire components, integrating searchable, AJAX-powered Select2 dropdowns into Livewire forms. Verify the supported Livewire major in the package's composer.json before installing.
Which Laravel and PHP versions does Select2Wire support?
The only upstream signal provided is a v2.0.1 release note saying Update composer requirements, so the exact Laravel and PHP ranges must be read from the package's composer.json. Confirm those constraints include your current production runtime and the Laravel major you plan to upgrade to before adopting or bumping.
How do I connect an Eloquent model or query to a Select2 dropdown?
Check the README and examples for the exact Livewire property and query API. The package is designed to connect models and queries to Select2 backed by server-side data, so you typically bind a component property to the select and let the server supply options.
Do I need custom JavaScript for AJAX search in Select2Wire?
No, avoiding custom JavaScript for AJAX-backed Select2 behavior is the core purpose described for Select2Wire. You still configure the Livewire component and server-side data source according to the package documentation.
Is Select2Wire safe for production Laravel applications?
There is not enough evidence in the provided assessment for a confident production-ready verdict. The main risk is the v2.0.1 dependency-constraint edit: tightened constraints fail loudly in Composer, while loosened constraints can silently resolve untested transitive versions. Review the composer.json diff, inspect the lockfile diff, and run your full test suite before production use.
How should I test a Select2Wire upgrade in my Laravel app?
Bump the package on a short-lived branch, then run composer update with the package and --with-dependencies in dry-run mode to surface resolution conflicts. After updating, run your full application test suite plus any package-specific integration tests. Inspect the lockfile diff for transitive packages that moved unexpectedly and treat those moves as review items.
What changed in Select2Wire v2.0.1?
The only available upstream signal is the v2.0.1 release note Update composer requirements. No changelog detail, diff, README, or CI status was provided. Diff composer.json between v2.0.0 and v2.0.1 to see which PHP and illuminate constraints changed and in which direction.
What are alternatives to Select2Wire for Laravel Livewire selects?
The provided context does not name specific alternative packages, so compare other Laravel or Livewire Select2 integrations against your version matrix and maintenance needs. Also consider a custom Livewire component with Select2 JavaScript if you need full control. Select2Wire's stated niche is connecting models and queries to searchable AJAX selects without custom JavaScript.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo