deleteAll() public static method
Deletes documents in the collection using the provided conditions.
WARNING: If you do not specify any condition, this method will delete documents rows in the collection.
For example, to delete all customers whose status is 3:
Customer::deleteAll(['status' => 3]);
| public static integer deleteAll ( $condition = [], $options = [] ) | ||
|---|---|---|
| $condition | array | 
 Description of the objects to delete. Please refer to yii\mongodb\Query::where() on how to specify this parameter.  |  
| $options | array | 
 List of options in format: optionName => optionValue.  |  
| return | integer | 
 The number of documents deleted.  |  
Please login to continue.