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