This package is a Filament plugin that allows you to create a multiselect with two sides.
You can install the package via composer:
composer require lucasgiovanny/filament-multiselect-two-sides
Optionally, you can publish the translations:
php artisan vendor:publish --tag="filament-multiselect-two-sides-translations"
use LucasGiovanny\FilamentMultiselectTwoSides\Forms\Components\Fields\MultiselectTwoSides;
return $form
->schema([
MultiselectTwoSides::make('roles')
->options([
'admin' => 'Admin',
'manager' => 'Manager',
'user' => 'User',
]),
]);
MultiselectTwoSides::make('roles')
->options([
'admin' => 'Admin',
'manager' => 'Manager',
'user' => 'User',
]
])
->selectableLabel('Available Roles')
->selectedLabel('Selected Roles'),
By default, the search is disabled. To enable it, use the enableSearch
method.
MultiselectTwoSides::make('roles')
->options([
'admin' => 'Admin',
'manager' => 'Manager',
'user' => 'User',
])
->enableSearch(),
MultiselectTwoSides::make('roles')
->options([
'admin' => 'Admin',
'manager' => 'Manager',
'user' => 'User',
])
->default(['admin', 'manager']),
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.