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