mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-21 15:53:45 +02:00
Fix inability to create a server
This commit is contained in:
@@ -39,6 +39,22 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
|
||||
return is_null($paginate) ? $instance->get($this->getColumns()) : $instance->paginate($paginate, $this->getColumns());
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the egg relations onto the server model.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param bool $refresh
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*/
|
||||
public function loadEggRelations(Server $server, bool $refresh = false): Server
|
||||
{
|
||||
if (! $server->relationLoaded('egg') || $refresh) {
|
||||
$server->load('egg.scriptFrom');
|
||||
}
|
||||
|
||||
return $server;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user