for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Html\Elements;
use Spatie\Html\Selectable;
use Spatie\Html\BaseElement;
class Option extends BaseElement implements Selectable
{
/** @var string */
protected $tag = 'option';
/**
* @return static
*/
public function selected()
return $this->attribute('selected', 'selected');
}
* @param bool $condition
*
public function selectedIf($condition)
return $condition ?
$this->selected() :
$this->unselected();
public function unselected()
return $this->forgetAttribute('selected');
* @param string|null $value
public function value($value)
return $this->attribute('value', $value);