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