@@ -18,15 +18,15 @@ |
||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $continue = true; |
| 21 | - while ($continue) { |
|
| 21 | + while ($continue) { |
|
| 22 | 22 | |
| 23 | - $check = $model->where($field, $rnd)->first(); |
|
| 23 | + $check = $model->where($field, $rnd)->first(); |
|
| 24 | 24 | |
| 25 | - if (!$check) |
|
| 26 | - $continue = false; |
|
| 25 | + if (!$check) |
|
| 26 | + $continue = false; |
|
| 27 | 27 | |
| 28 | - return $rnd; |
|
| 29 | - } |
|
| 28 | + return $rnd; |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | private static function randomStr($length = 16) |
@@ -22,8 +22,9 @@ |
||
| 22 | 22 | |
| 23 | 23 | $check = $model->where($field, $rnd)->first(); |
| 24 | 24 | |
| 25 | - if (!$check) |
|
| 26 | - $continue = false; |
|
| 25 | + if (!$check) { |
|
| 26 | + $continue = false; |
|
| 27 | + } |
|
| 27 | 28 | |
| 28 | 29 | return $rnd; |
| 29 | 30 | } |