Files
pterodactyl-panel/app/Actions/Servers/DetachMountFromServer.php
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

19 lines
495 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Actions\Servers;
use Pterodactyl\Contracts\Servers\DetachesMountsFromServers;
use Pterodactyl\Models\Mount;
use Pterodactyl\Models\MountServer;
use Pterodactyl\Models\Server;
final readonly class DetachMountFromServer implements DetachesMountsFromServers
{
public function detach(Server $server, Mount $mount): void
{
MountServer::query()->where('mount_id', $mount->id)->where('server_id', $server->id)->delete();
}
}