@php $providerOptions = $provider ? ($provider->options ?? []) : []; $currentEngine = old('engine', $provider->engine ?? $providerDefaults['engine']); $currentNode = old('node_id', $provider->node_id ?? $providerDefaults['node_id']); $currentEnabled = filter_var(old('enabled', $provider->enabled ?? $providerDefaults['enabled']), FILTER_VALIDATE_BOOLEAN); $currentTls = filter_var(old('use_tls', array_get($providerOptions, 'tls')), FILTER_VALIDATE_BOOLEAN); $portId = $modalId . 'Port'; $enabledId = $modalId . 'Enabled'; $tlsId = $modalId . 'Tls'; $testConnectionId = $modalId . 'TestConnection'; $redisStart = old('redis_port_start', array_get($providerOptions, 'redis_port_start')); $redisEnd = old('redis_port_end', array_get($providerOptions, 'redis_port_end')); $redisMaxInstances = old('redis_max_instances', array_get($providerOptions, 'redis_max_instances')); $redisMemoryMb = old('redis_memory_mb', array_get($providerOptions, 'redis_memory_mb')); $redisPolicy = old('redis_maxmemory_policy', array_get($providerOptions, 'redis_maxmemory_policy', 'noeviction')); $redisAllocationsEnabled = filter_var(old('redis_enable_allocations', array_get($providerOptions, 'redis_enable_allocations', false)), FILTER_VALIDATE_BOOLEAN); $redisPersistence = filter_var(old('redis_persistence', array_get($providerOptions, 'redis_persistence', false)), FILTER_VALIDATE_BOOLEAN); $redisRuntimeUser = old('redis_runtime_user', array_get($providerOptions, 'redis_runtime_user', 'www-data')); $postgresRevokePublicConnect = filter_var(old('postgres_revoke_public_connect', array_get($providerOptions, 'postgres_revoke_public_connect', false)), FILTER_VALIDATE_BOOLEAN); $postgresRevokePublicTemporary = filter_var(old('postgres_revoke_public_temporary', array_get($providerOptions, 'postgres_revoke_public_temporary', false)), FILTER_VALIDATE_BOOLEAN); $redisGloballyEnabled = app(\Pterodactyl\BlueprintFramework\Extensions\betterdatabases\Services\Databases\Providers\DatabaseDashboardSettingsService::class)->redisAllocationsEnabled(); @endphp