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