mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
update
This commit is contained in:
parent
fecbf7255e
commit
2610c48c79
2 changed files with 91 additions and 0 deletions
84
web/app/Filament/Pages/PHPInstaller.php
Normal file
84
web/app/Filament/Pages/PHPInstaller.php
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Livewire\Installer;
|
||||
use App\SupportedApplicationTypes;
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Wizard;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Forms\Get;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class PHPInstaller extends Installer
|
||||
{
|
||||
|
||||
protected static string $layout = 'filament-panels::components.layout.index';
|
||||
|
||||
protected static string $view = 'filament.pages.php-installer';
|
||||
|
||||
protected static ?string $navigationLabel = 'PHP Installer';
|
||||
|
||||
protected static ?string $slug = 'php-installer';
|
||||
|
||||
protected static bool $shouldRegisterNavigation = false;
|
||||
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
|
||||
return $form
|
||||
->schema([
|
||||
|
||||
Wizard::make([
|
||||
|
||||
Wizard\Step::make('Step 1')
|
||||
->description('Install PHP, Addons, and Extensions')
|
||||
->schema([
|
||||
|
||||
// PHP Configuration
|
||||
CheckboxList::make('server_php_versions')
|
||||
->default([
|
||||
'8.2'
|
||||
])
|
||||
->label('PHP Version')
|
||||
->options(SupportedApplicationTypes::getPHPVersions())
|
||||
->columns(5)
|
||||
->required(),
|
||||
|
||||
CheckboxList::make('server_php_modules')
|
||||
->label('PHP Modules')
|
||||
->columns(5)
|
||||
->options(SupportedApplicationTypes::getPHPModules()),
|
||||
|
||||
]),
|
||||
|
||||
Wizard\Step::make('Step 2')
|
||||
->description('Finish installation')
|
||||
->schema([
|
||||
|
||||
TextInput::make('install_log')
|
||||
->view('livewire.installer-install-log')
|
||||
->label('Installation Log'),
|
||||
|
||||
])
|
||||
|
||||
])->persistStepInQueryString()
|
||||
//->startOnStep($startOnStep)
|
||||
->submitAction(new HtmlString(Blade::render(<<<BLADE
|
||||
<x-filament::button
|
||||
type="submit"
|
||||
size="sm"
|
||||
color="primary"
|
||||
wire:click="install"
|
||||
>
|
||||
Submit
|
||||
</x-filament::button>
|
||||
BLADE)))
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<x-filament-panels::page>
|
||||
|
||||
<div>
|
||||
{{$this->form}}
|
||||
</div>
|
||||
|
||||
</x-filament-panels::page>
|
Loading…
Reference in a new issue