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