$db public property
The MongoDB connection object or the application component ID of the MongoDB connection. After the MongoDbTarget object is created, if you want to change this property, you should only assign it with a MongoDB connection object.
public yii\mongodb\Connection|string $db = 'mongodb'