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