Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -8,35 +8,21 @@ use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
|||
|
||||
class ReinstallServerService
|
||||
{
|
||||
/**
|
||||
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
|
||||
*/
|
||||
private $daemonServerRepository;
|
||||
|
||||
/**
|
||||
* @var \Illuminate\Database\ConnectionInterface
|
||||
*/
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
* ReinstallService constructor.
|
||||
*/
|
||||
public function __construct(
|
||||
ConnectionInterface $connection,
|
||||
DaemonServerRepository $daemonServerRepository
|
||||
private ConnectionInterface $connection,
|
||||
private DaemonServerRepository $daemonServerRepository
|
||||
) {
|
||||
$this->daemonServerRepository = $daemonServerRepository;
|
||||
$this->connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinstall a server on the remote daemon.
|
||||
*
|
||||
* @return \Pterodactyl\Models\Server
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function handle(Server $server)
|
||||
public function handle(Server $server): Server
|
||||
{
|
||||
return $this->connection->transaction(function () use ($server) {
|
||||
$server->fill(['status' => Server::STATUS_INSTALLING])->save();
|
||||
|
|
Reference in a new issue