protected function update($data)
    {
        try {

            if ($this->updateTouch) {
                $data[$this->updateTouchName] = date('Y-m-d H:i:s');
            }

            $this->db->update(
                $this->table,
                $this->fromArray($data),
                [
                    $this->primaryKey => $data[$this->primaryKey]
                ]
            );

            $id = $data[$this->primaryKey];

        } catch (\Exception $e) {
            throw $e;
        }

        return $id;
    }
protected function update($data)
    {
        try {

            if ($this->updateTouch) {
                $data[$this->updateTouchName] = date('Y-m-d H:i:s');
            }

            $this->db->update(
                $this->table,
                $this->fromArray($data),
                [
                    $this->primaryKey => $data[$this->primaryKey]
                ]
            );

            $id = $data[$this->primaryKey];

        } catch (\Exception $e) {
            throw $e;
        }

        return $id;
    }
protected function update ( $ data ) { try { if ( $ this -> updateTouch ) { $ data [ $ this -> updateTouchName ] = date ( 'Y-m-d H:i:s' ) ; } $ this -> db -> update ( $ this -> table , $ this -> fromArray ( $ data ) , [ $ this -> primaryKey => $ data [ $ this -> primaryKey ] ] ) ; $ id = $ data [ $ this -> primaryKey ] ; } catch ( \ Exception $ e ) { throw $ e ; } return $ id ; }
Atualiza um registro na tabela.

@param array $data

@return mixed

@throws \Exception
Atualiza um registro na tabela .