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