fix: null->0 for parent_id/sort NOT NULL columns; prevent DB constraint violation
This commit is contained in:
@@ -25,6 +25,7 @@ class PositionController extends Controller
|
||||
]);
|
||||
|
||||
$data['store_id'] = auth()->user()->store_id;
|
||||
$data['sort'] = $data['sort'] ?? 0;
|
||||
$position = Position::create($data);
|
||||
return $this->success($position, '创建成功');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user