Saeed Vaziry b2083fc6b2
Migrate to HTMX (#114)
Dropped Livewire
Added HTMX
Added Blade code lint
Drop Mysql and Redis
Migrate to SQLite
2024-03-06 17:02:59 +01:00

31 lines
655 B
PHP

<?php
namespace App\ServiceHandlers;
use App\Jobs\PHP\InstallPHPExtension;
use App\Models\Service;
use App\SSHCommands\PHP\ChangeDefaultPHPCommand;
class PHP
{
protected Service $service;
public function __construct(Service $service)
{
$this->service = $service;
}
public function setDefaultCli(): void
{
$this->service->server->ssh()->exec(
new ChangeDefaultPHPCommand($this->service->version),
'change-default-php'
);
}
public function installExtension($name): void
{
dispatch(new InstallPHPExtension($this->service, $name))->onConnection('ssh');
}
}