status = 'complete'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the verify action. * * @param Teacher $teacher * * @return Teacher */public function verify(Teacher $teacher) { try { $teacher->status = 'verify'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the approve action. * * @param Teacher $teacher * * @return Teacher */public function approve(Teacher $teacher) { try { $teacher->status = 'approve'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the publish action. * * @param Teacher $teacher * * @return Teacher */public function publish(Teacher $teacher) { try { $teacher->status = 'publish'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the archive action. * * @param Teacher $teacher * * @return Teacher */ public function archive(Teacher $teacher) { try { $teacher->status = 'archive'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } /** * Perform the unpublish action. * * @param Teacher $teacher * * @return Teacher */ public function unpublish(Teacher $teacher) { try { $teacher->status = 'unpublish'; return $teacher->save(); } catch (Exception $e) { throw new WorkflowActionNotPerformedException(); } } }