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