There was an error while loading. Please reload this page.
It's possible to make a query and execute the commands above.
public function updateAll(array $data): int
This method returns the number of rows affected.
PHP's way:
$repository ->isBetween('price', 0.99, 1.99) ->updateAll([ 'category_id' => 22, ]);
SQL's representation:
UPDATE products SET category_id = 22 WHERE price BETWEEN 0.99 AND 1.99;
public function deleteAll(): int
$repository ->equals('active', 0) ->deleteAll();
DELETE FROM users WHERE active = 0;
🡄 Aggregation | Advanced Queries 🡆
Home