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;
    }