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