Ensure the UUID is set correctly; closes #2450
This commit is contained in:
parent
a9e4587125
commit
1f28fb94e2
1 changed files with 5 additions and 3 deletions
|
@ -102,9 +102,11 @@ class MountController extends Controller
|
|||
public function create(MountFormRequest $request)
|
||||
{
|
||||
/** @var \Pterodactyl\Models\Mount $mount */
|
||||
$mount = Mount::query()->create(array_merge($request->validated(), [
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
]));
|
||||
$model = (new Mount())->fill($request->validated());
|
||||
$model->forceFill(['uuid' => Uuid::uuid4()->toString()]);
|
||||
|
||||
$model->saveOrFail();
|
||||
$mount = $model->fresh();
|
||||
|
||||
$this->alert->success('Mount was created successfully.')->flash();
|
||||
|
||||
|
|
Loading…
Reference in a new issue