Skip to content

Commit 38b4488

Browse files
authored
Update Uuid.php
1 parent 380c332 commit 38b4488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/Uuid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static function uuid($hex = true)
1717

1818
public static function getCurrentSerialNumber(string $modelClass, $serialNumberField = 'serial_number'): int
1919
{
20-
return $modelClass::whereDate('created_at', now())->max(DB::raw("cast({$serialNumberField} as UNSIGNED INTEGER)")) ?? 0;
20+
return $modelClass::whereDate('created_at', now())->max(DB::raw("cast(`{$serialNumberField}` as UNSIGNED INTEGER)")) ?? 0;
2121
}
2222

2323
public static function generateNextSerialNumberNo(int $serialNumber, int $padLength = 3): string

0 commit comments

Comments
 (0)