Plugins base (#613)

* wip

* wip

* cleanup

* notification channels

* phpstan

* services

* remove server types

* refactoring

* refactoring
This commit is contained in:
Saeed Vaziry
2025-06-14 14:35:18 +02:00
committed by GitHub
parent adc0653d15
commit 131b828807
311 changed files with 3976 additions and 2660 deletions

View File

@ -2,43 +2,20 @@
namespace App\SiteTypes;
use App\DTOs\DynamicFieldDTO;
use App\DTOs\DynamicFieldsCollectionDTO;
use App\Enums\SiteFeature;
use App\Exceptions\SSHError;
use App\Models\Site;
use Illuminate\Validation\Rule;
class PHPBlank extends PHPSite
{
public static function id(): string
{
return 'php-blank';
}
public static function make(): self
{
return new self(new Site(['type' => \App\Enums\SiteType::PHP]));
}
public function supportedFeatures(): array
{
return [
SiteFeature::DEPLOYMENT,
SiteFeature::COMMANDS,
SiteFeature::ENV,
SiteFeature::SSL,
SiteFeature::WORKERS,
];
}
public function fields(): DynamicFieldsCollectionDTO
{
return new DynamicFieldsCollectionDTO([
DynamicFieldDTO::make('php_version')
->component()
->label('PHP Version'),
DynamicFieldDTO::make('web_directory')
->text()
->label('Web Directory')
->placeholder('For / leave empty')
->description('The relative path of your website from /home/vito/your-domain/'),
]);
return new self(new Site(['type' => self::id()]));
}
public function createRules(array $input): array