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