livewire-select
livewire-select copied to clipboard
How to use this package in Bootstrap-Laravel?
I am wondering how to use this package in Laravel with Bootstrap?
@desyashasyi if you converted it in bootstrap can you post the changes?
@desyashasyi if you converted it in bootstrap can you post the changes?
you can custom class style to bootstrap form-select like this:
<?php
namespace App\Http\Livewire\Custom\Components;
use Asantibanez\LivewireSelect\LivewireSelect;
use Illuminate\Support\Collection;
class Tags extends LivewireSelect
{
public function options($searchTerm = null): Collection
{
return collect([
[
'value' => 'honda',
'description' => 'Honda',
],
[
'value' => 'mazda',
'description' => 'Mazda',
],
[
'value' => 'tesla',
'description' => 'Tesla',
],
]);
}
public function styles() // Add this method for customing class element
{
return [
'default' => 'form-select w-50',
];
}
}