fix enums

This commit is contained in:
Saeed Vaziry
2024-11-01 22:08:02 +01:00
parent 37a4b6af51
commit f743611b22
6 changed files with 67 additions and 55 deletions

View File

@ -3,6 +3,7 @@
namespace App\Web\Pages\Servers\PHP;
use App\Actions\PHP\InstallNewPHP;
use App\Enums\PHP;
use App\Models\Service;
use App\Web\Pages\Servers\Page;
use App\Web\Pages\Servers\PHP\Widgets\PHPList;
@ -43,7 +44,7 @@ protected function getHeaderActions(): array
Select::make('version')
->options(
collect(config('core.php_versions'))
->filter(fn ($version) => ! in_array($version, $installedPHPs))
->filter(fn ($version) => ! in_array($version, array_merge($installedPHPs, [PHP::NONE])))
->mapWithKeys(fn ($version) => [$version => $version])
->toArray()
)