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