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