public function setCover($id, $file) { $this->cover_json = $this->cover()->set($id, $file); $this->save(); }