src/Services/Saver.php
protected function nullifyEmptyNullables($table)
    {
        $columns = scheme()->columns($table);

        foreach ($this->data as $key => &$value) {
            if (!array_key_exists($key, $columns)) {
                continue;
            }

            if (!$columns[$key]->getNotnull() && empty($value)) {
                $value = null;
            }
        }
    }
protected function nullifyEmptyNullables($table)
    {
        $columns = scheme()->columns($table);

        foreach ($this->data as $key => &$value) {
            if (!array_key_exists($key, $columns)) {
                continue;
            }

            if (!$columns[$key]->getNotnull() && empty($value)) {
                $value = null;
            }
        }
    }
protected function nullifyEmptyNullables ( $ table ) { $ columns = scheme ( ) -> columns ( $ table ) ; foreach ( $ this -> data as $ key => & $ value ) { if ( ! array_key_exists ( $ key , $ columns ) ) { continue ; } if ( ! $ columns [ $ key ] -> getNotnull ( ) && empty ( $ value ) ) { $ value = null ; } } }
Set empty "nullable" values to null.

@param $table
Set empty nullable values to null .