yii\db\ActiveRecordInterface::deleteAll PHP Method

deleteAll() public static method

WARNING: If you do not specify any condition, this method will delete ALL rows in the table. For example, to delete all customers whose status is 3: php Customer::deleteAll([status = 3]);
public static deleteAll ( array $condition = null ) : integer
$condition array the condition that matches the records that should get deleted. Please refer to [[QueryInterface::where()]] on how to specify this parameter. An empty condition will match all records.
return integer the number of rows deleted
    public static function deleteAll($condition = null);