all(), [ // "ownerType" => "required|max:32", // "ownerId" => "required|integer|min:1", // "barId" => "required|integer|min:1" // ]); // if ($validator->fails()) { // return $this->fail(REQUEST_PARAM_ERROR, $this->error[REQUEST_PARAM_ERROR], $validator->errors()); // } // // $ownerType = $request->input("ownerType"); // $ownerId = (int)$request->input("ownerId"); // $barId = (int)$request->input("barId"); // // $userActionBar = new Models\UserActionBar(); // $result = $userActionBar->AssignUserActionBar($ownerType, $ownerId, $barId); // if ($result["code"] == 0) { // return $this->success($result["data"]); // } // return $this->fail($result["code"], $this->error[$result["code"]]); // } // // public function RemoveUserActionBar(Request $request) // { // $validator = Validator::make($request->all(), [ // "id" => "required|integer|min:1", //// "ownerType" => "required|max:32", //// "ownerId" => "required|integer|min:1", //// "barId" => "required|integer|min:1" // ]); // if ($validator->fails()) { // return $this->fail(REQUEST_PARAM_ERROR, $this->error[REQUEST_PARAM_ERROR], $validator->errors()); // } // // $id = (int)$request->input("id"); //// $ownerType = $request->input("ownerType"); //// $ownerId = $request->input("ownerId"); //// $barId = $request->input("barId"); // // $userActionBar = new Models\UserActionBar(); // $code = $userActionBar->RemoveUserActionBar($id); // return $this->response($code, $this->error[$code]); // } }