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