'staff_3', 'requestData' => [ 'name' => [ 'validation' => DataValidator::alnum(), 'error' => ERRORS::INVALID_NAME ] ] ]; } public function handler() { $name = Controller::request('name'); $departmentInstance = new Department(); $departmentInstance->setProperties([ 'name' => $name, ]); $departmentInstance->store(); Log::createLog('ADD_DEPARTMENT', $name); Response::respondSuccess(); } }