Files
Nexora/app/View/Components/Multiselect.php
Javi 356f56eebd
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
first commit
2025-04-23 00:14:33 +06:00

36 lines
751 B
PHP

<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Multiselect extends Component
{
public $options;
public $selected;
public $name;
public $id;
/**
* Create a new component instance.
*/
public function __construct($options = [], $selected = [], $name = 'multiselect', $id = null)
{
$this->options = $options;
$this->selected = $selected;
$this->name = $name;
$this->id = $id ?? 'multiselect-' . uniqid();
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.multiselect');
}
}