for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Terranet\Administrator\Field;
class Number extends Field
{
/** @var int */
protected $min = 0;
/** @var null|int */
protected $max = null;
/** @var int|double */
protected $step = 1;
/**
* @param int $min
* @return $this
*/
public function min(int $min): self
$this->min = $min;
return $this;
}
* @param null|int $max
public function max(?int $max): self
$this->max = $max;
* @param float|int $step
public function step($step): self
$this->step = $step;
* @return array
public function getAttributes(): array
return parent::getAttributes() + [
'min' => $this->min,
'max' => $this->max,
'step' => $this->step,
'style' => 'width: 150px',
];