diff --git a/app/Services/Databases/DeployServerDatabaseService.php b/app/Services/Databases/DeployServerDatabaseService.php index ec678e40a..f10473bf1 100644 --- a/app/Services/Databases/DeployServerDatabaseService.php +++ b/app/Services/Databases/DeployServerDatabaseService.php @@ -38,7 +38,9 @@ class DeployServerDatabaseService throw new NoSuitableDatabaseHostException(); } - $databaseHostId = $hosts->random()->id; + /** @var \Pterodactyl\Models\DatabaseHost $databaseHost */ + $databaseHost = $hosts->random(); + $databaseHostId = $databaseHost->id; } return $this->managementService->create($server, [