for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Terranet\Administrator\Field;
class Boolean extends Field
{
/** @var mixed */
protected $trueValue = true;
protected $falseValue = false;
/**
* @param $value
*
* @return $this
*/
public function trueValue($value)
$this->trueValue = $value;
return $this;
}
public function falseValue($value)
$this->falseValue = $value;
* @return bool
public function isTrue()
return $this->value() === $this->trueValue;
* @return array
public function onIndex()
return ['isTrue' => $this->isTrue()];
public function onView()
return $this->onIndex();