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