/** * @param $dbName * @param $collectionName * @param $newCollectionName * @return bool */ public function renameCollection($dbName, $collectionName, $newCollectionName) { $dbResponse = DB::getMongoClient()->admin->command(['renameCollection' => "{$dbName}.{$collectionName}", 'to' => "{$dbName}.{$newCollectionName}"]); return $this->checkResult($dbResponse); }