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