isChecked = $value === 'true'; } public function render(): string { $radioInput = form_radio( [ 'id' => $this->value, 'name' => $this->name, 'class' => 'text-pine-500 border-black border-3 focus:ring-castopod w-6 h-6', ], $this->value, old($this->name) ? old($this->name) === $this->value : $this->isChecked, ); return <<{$radioInput}{$this->slot} HTML; } }