src/Model.php
protected function setAttributeType($name, $value)
    {

        if (array_key_exists($name, $this->casts)) {
            if (in_array($this->casts[$name], $this->castTypes)) {
                settype($value, $this->casts[$name]);
            }
        }

        return $value;
    }
protected function setAttributeType($name, $value)
    {

        if (array_key_exists($name, $this->casts)) {
            if (in_array($this->casts[$name], $this->castTypes)) {
                settype($value, $this->casts[$name]);
            }
        }

        return $value;
    }
protected function setAttributeType ( $ name , $ value ) { if ( array_key_exists ( $ name , $ this -> casts ) ) { if ( in_array ( $ this -> casts [ $ name ] , $ this -> castTypes ) ) { settype ( $ value , $ this -> casts [ $ name ] ) ; } } return $ value ; }
Set attributes casting
@param $name
@param $value
@return mixed
Set attributes casting