isOptional = $value === 'true'; } public function render(): string { $labelClass = 'text-sm ' . $this->attributes['class']; unset($this->attributes['class']); $attributes = stringify_attributes($this->attributes); $optionalText = $this->isOptional ? '(' . lang('Common.optional') . ')' : ''; $hint = $this->hint === null ? '' : hint_tooltip($this->hint, 'ml-1'); return <<{$this->slot}{$optionalText}{$hint} HTML; } }