Skip to content

Commit 318319d

Browse files
authored
Update Controller.php
1 parent a40500b commit 318319d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frameworks/PHP/laravel/app/Http/Controllers/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function updates($queries = 1)
5252

5353
while ($queries--) {
5454
$row = World::query()->find(self::randomInt());
55-
$row->randomNumber = self::randomInt();
55+
$row->randomNumber = ($randomInt = self::randomInt()) !== $row->randomNumber ? $randomInt : $randomInt + 1;
5656
$row->save();
5757

5858
$rows[] = $row;

0 commit comments

Comments
 (0)