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