form->getState(); $examRep = new ExamRepository(); try { $this->record = $examRep->store($data); $this->notify('success', $this->getCreatedNotificationMessage()); if ($another) { // Ensure that the form record is anonymized so that relationships aren't loaded. $this->form->model($this->record::class); $this->record = null; $this->fillForm(); return; } $this->redirect($this->getResource()::getUrl('index')); } catch (\Exception $exception) { $this->notify('danger', $exception->getMessage()); } } }