protected function castToDb($value, $column)
    {
        if ($this->hasCast($column) && !$this->isIgnoreCast($value)) {
            $value = $this->toDbType($value, $this->casts[$column]);
        }

        return $value;
    }
protected function castToDb($value, $column)
    {
        if ($this->hasCast($column) && !$this->isIgnoreCast($value)) {
            $value = $this->toDbType($value, $this->casts[$column]);
        }

        return $value;
    }
protected function castToDb ( $ value , $ column ) { if ( $ this -> hasCast ( $ column ) && ! $ this -> isIgnoreCast ( $ value ) ) { $ value = $ this -> toDbType ( $ value , $ this -> casts [ $ column ] ) ; } return $ value ; }
Cast column value for saving to database

@param mixed $value
@param string $column
@return mixed
Cast column value for saving to database