'staff_2', 'requestData' => [ 'name' => [ 'validation' => DataValidator::length(2, 100), 'error' => ERRORS::INVALID_NAME ] ] ]; } public function handler() { $topic = new Topic(); $topic->setProperties([ 'name' => Controller::request('name'), 'icon' => Controller::request('icon'), 'iconColor' => Controller::request('iconColor'), 'private' => Controller::request('private') ? 1 : 0 ]); Log::createLog('ADD_TOPIC', $topic->name); Response::respondSuccess([ 'topicId' => $topic->store() ]); } }