*/ protected array $options = []; protected string $selected; public function setOptions(string $value): void { // dd(json_decode(html_entity_decode(html_entity_decode($value)), true)); $this->options = json_decode(html_entity_decode($value), true); } public function render(): string { $defaultAttributes = [ 'data-class' => 'border-3 rounded-lg ' . $this->class, ]; $extra = array_merge($defaultAttributes, $this->attributes); return form_dropdown($this->name, $this->options, $this->selected !== '' ? [$this->selected] : [], $extra); } }