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