maxId
This commit is contained in:
parent
86cd7c742f
commit
7b44fad071
@ -111,7 +111,7 @@ class PackageService extends Service
|
||||
$attributes['guide_price'] = intval($attributes['guide_price'] * 100);
|
||||
|
||||
if (!$attributes['id']) {
|
||||
$maxId = Package::withTrashed()->where('type', $attributes['type'])->max('id');
|
||||
$maxId = Package::withTrashed()->max('id');
|
||||
$attributes['id'] = $maxId ? $maxId + 1 : 1;
|
||||
$node = $this->packageRepository->create($attributes);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user