/** * update query * * @param File $file file instance * @return File */ public function update(File $file) { $diff = $file->diff(); if (count($diff) > 0) { $this->conn->table($this->table)->where('id', $file->id)->update($diff); } return $this->createFile(array_merge($file->getOriginal(), $diff)); }