New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

sertxudeveloper/livewire-combobox

Add combobox to your Livewire forms
3,323 5

Larablocks Analysis

sertxudeveloper/livewire-combobox works with Laravel 10 and 11 (latest release v2.1.1, Mar 11, 2024), all past end of life (the last on Mar 12, 2026): no more fixes, even for security.

Laravel 9 in earlier releases.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 10 and 11, past end of life since Mar 12, 2026
  • No release in the last 12 months (last: Mar 11, 2024)
  • 1 downloads a month (needs 10,000)
  • 5 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Mar 11, 2024.
  • No releases in the last 12 months.
  • First released: Jun 10, 2022.
  • Monthly downloads: 1, down 93% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 26, 2026.

Install
composer require sertxudeveloper/livewire-combobox
Latest Version:v2.1.1
PHP:^8.1|^8.2
Laravel:10 · 11
Older releases:9
License:MIT
Last Updated:Oct 7, 2024
Links: GitHub  ·  Packagist
Maintainer: sertxudev

Laravel Combobox by Sertxu Developer

Add combobox to your Livewire forms

Codecov Test coverage

Do you have a large dataset, and you need to be able to display it in a dropdown?

When a basic select input is not enough, you can use a combobox!

A combobox works like a select input, but instead of a dropdown, it displays a list of options that can be filtered by typing.

You will no longer need to download all the data at the startup, just get the data you're looking for.

Installation

You can install the package via composer:

composer require sertxudeveloper/livewire-combobox

Usage

Once you have installed the package, you can use it in your Livewire forms.

First, you need to execute the following command in your terminal:

php artisan combobox:make UsersCombobox -m User

This will create a new component in the app/Livewire directory.

The new UsersCombobox component will look like this:

<?php

namespace App\Livewire;

use App\Models\User;
use SertxuDeveloper\LivewireCombobox\Components\Combobox;

class UsersCombobox extends Combobox
{

    /** @var class-string<Model> $model */
    public string $model = User::class;

}

As you can see, the $model property is set to the User model. This means that the component will be able to query the database using this model.

By default, the component will display the name column of the model. You can change this by setting the labelColumn property:

/**
 * The column to be shown as the label.
 *
 * @var string
 */
public string $labelColumn = 'title'; // Default: 'name'

To start using the component, you need to add it to your Livewire form.

<livewire:users-combobox>
@livewire('users-combobox')

You can also pass some parameters to the component:

<livewire:users-combobox name="author" label="Author" placeholder="Select a user">

[!WARNING] If you don't pass any parameters, the component will use the default values.
It's recommended to pass the parameters to the component.
You can also add the values overriding the default values in the class.

Events

While interacting with the component, some events might be fired.

The name of the events depends on the component name, this allows you to have more than one combobox in your form.

  • selected-<component-name>: When the user selects an option from the dropdown.
  • cleared-<component-name>: When the user clears the selected option.

These events will be fired up, so the parent component can react to the user interaction.

[!Note] The selected event contains the selected model as a parameter.

Adding filters

You can filter the results by adding filters to the component.

/**
 * Apply filters to the query.
 *
 * @param Builder $query
 * @return void
 */
protected function filter(Builder $query): void {
    $query->where('email', 'like', "%@example.com");
}

The filter method receives the query builder as a parameter, so you can add as many filters as you want.

The filters will be applied to the query before fetching the results, so you can use them to limit the options given to the user.

Testing

This package contains tests, you can run them using the following command:

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.



Copyright © 2022 Sertxu Developer

Related Packages

sertxudeveloper/laravel-lockscreen

Package for locking the user account due to inactivity

4,505 6
sertxudeveloper/laravel-media-model

Attach media files to your models

3,120 11
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440

Version History

Version Released PHP Laravel License
v2.1.1 ^8.1|^8.2 ^10.0|^11.0 MIT
v2.1.0 ^8.1|^8.2 ^10.0|^11.0 MIT
v2.0.0 ^8.1|^8.2 ^10.0 MIT
v1.4.2 ^8.1 ^9.5|^10.0 MIT
v1.4.1 ^8.1 ^9.5|^10.0 MIT