/** * Get the data for the object from database for the given name * * @param string $name */ public function save() { if ($this->model->getId()) { return $this->model->update(); } return $this->create(); }