mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 11:55:51 -05:00
21 lines
470 B
PHP
21 lines
470 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Actions\Allocations;
|
|
|
|
use Pterodactyl\Contracts\Allocations\UpdatesAllocations;
|
|
use Pterodactyl\Models\Allocation;
|
|
|
|
final class UpdateAllocation implements UpdatesAllocations
|
|
{
|
|
public function update(Allocation $allocation, ?string $alias): Allocation
|
|
{
|
|
$allocation->forceFill([
|
|
'ip_alias' => empty($alias) ? null : $alias,
|
|
])->saveOrFail();
|
|
|
|
return $allocation;
|
|
}
|
|
}
|