We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 380c332 commit 38b4488Copy full SHA for 38b4488
src/Utils/Uuid.php
@@ -17,7 +17,7 @@ public static function uuid($hex = true)
17
18
public static function getCurrentSerialNumber(string $modelClass, $serialNumberField = 'serial_number'): int
19
{
20
- return $modelClass::whereDate('created_at', now())->max(DB::raw("cast({$serialNumberField} as UNSIGNED INTEGER)")) ?? 0;
+ return $modelClass::whereDate('created_at', now())->max(DB::raw("cast(`{$serialNumberField}` as UNSIGNED INTEGER)")) ?? 0;
21
}
22
23
public static function generateNextSerialNumberNo(int $serialNumber, int $padLength = 3): string
0 commit comments