/** * Apply mode insert on the repository * * @return bool */ protected function onInsertSuccess() { try { $this->repository->insert($this->repository->getBaseTable(), $this->getValues()); } catch (Exception $e) { Notification::error($this->getInsertMessage(false)); $this->error($e->getMessage()); return false; } Notification::success($this->getInsertMessage(true)); return true; }