updateAllCounters() public static method
Updates all matching records using the provided counter changes and conditions. For example, to add 1 to age of all customers whose status is 2, Customer::updateAllCounters(['age' => 1], ['status' => 2]);
See also [[yii\elasticsearch\ActiveRecord::primaryKeysByCondition()]].
public static integer updateAllCounters ( $counters, $condition = [] )$counters array
The counters to be updated (attribute name => increment value). Use negative va