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