get('class'); // Rimozione classe CSS predefinita $key = $class->search('form-control'); $class->forget($key); // Correzione valore impostato a boolean $value = $this->get('value'); $this->set([ 'value' => empty($value) || $value == 'off' ? false : true, 'placeholder' => $this->get('placeholder', $this->get('label')), ]); } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|string */ public function render() { return view('components.inputs.checkbox'); } }