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