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 a9e4587 commit 1f28fb9Copy full SHA for 1f28fb9
app/Http/Controllers/Admin/MountController.php
@@ -102,9 +102,11 @@ public function view($id)
102
public function create(MountFormRequest $request)
103
{
104
/** @var \Pterodactyl\Models\Mount $mount */
105
- $mount = Mount::query()->create(array_merge($request->validated(), [
106
- 'uuid' => Uuid::uuid4()->toString(),
107
- ]));
+ $model = (new Mount())->fill($request->validated());
+ $model->forceFill(['uuid' => Uuid::uuid4()->toString()]);
+
108
+ $model->saveOrFail();
109
+ $mount = $model->fresh();
110
111
$this->alert->success('Mount was created successfully.')->flash();
112
0 commit comments