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