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