This commit is contained in:
Bozhidar 2024-05-15 15:13:02 +03:00
parent 5568bafa53
commit 77d98233cb
4 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,36 @@
<?php
namespace app\Filament\Pages;
use App\Installers\Server\Applications\NodeJsInstaller;
use App\Installers\Server\Applications\PythonInstaller;
use App\Installers\Server\Applications\RubyInstaller;
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 PHPInfo extends Installer
{
protected static string $view = 'filament.pages.php-info';
protected static ?string $navigationLabel = 'PHP Info';
protected static ?string $slug = 'php-info';
protected static bool $shouldRegisterNavigation = false;
public function getTitle(): string
{
return 'PHP Info';
}
}

View file

@ -29,6 +29,11 @@ class PHPInstaller extends Installer
protected static bool $shouldRegisterNavigation = false;
public function getTitle(): string
{
return 'PHP Installer';
}
public function form(Form $form): Form
{
@ -97,4 +102,10 @@ class PHPInstaller extends Installer
]);
}
public function getRedirectLinkAfterInstall()
{
return '/admin/php-info';
}
}

View file

@ -305,7 +305,7 @@ class Installer extends Page
file_put_contents(storage_path('installed'), 'installed-'.date('Y-m-d H:i:s'));
return redirect('/admin/login');
return redirect($this->getRedirectLinkAfterInstall());
}
} else {
@ -313,4 +313,9 @@ class Installer extends Page
}
}
public function getRedirectLinkAfterInstall()
{
return '/admin/login';
}
}

View file

@ -0,0 +1,7 @@
<x-filament-panels::page>
<div>
Installed PHP Version: {{ phpversion() }}
</div>
</x-filament-panels::page>