mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-05 13:55:44 -05:00
21 lines
547 B
PHP
21 lines
547 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Actions\Servers;
|
|
|
|
use Pterodactyl\Contracts\Servers\UpdatesServerVariable;
|
|
use Pterodactyl\Models\Server;
|
|
use Pterodactyl\Models\ServerVariable;
|
|
|
|
final readonly class UpdateServerVariable implements UpdatesServerVariable
|
|
{
|
|
public function update(Server $server, int $variableId, string $value): void
|
|
{
|
|
ServerVariable::query()->updateOrCreate(
|
|
['server_id' => $server->id, 'variable_id' => $variableId],
|
|
['variable_value' => $value],
|
|
);
|
|
}
|
|
}
|