<?php namespace App\View; class CheckboxWidget extends Widget { public function checked($condition=true) { $this->value = (bool)$condition; return $this; } }