step === 1) { $this->validate([ 'name' => ['required', 'string', 'min:3', 'max:64'], 'env' => ['required', 'in:prod,staging,edge,dev'], ]); } $this->step = min(4, $this->step + 1); } public function prevStep(): void { $this->step = max(1, $this->step - 1); } public function getSlugProperty(): string { return Str::slug($this->name) ?: 'neuer-cluster'; } public function getMonthlyPriceProperty(): int { $base = match ($this->size) { 'small' => 4900, 'medium' => 9900, 'large' => 24900, default => 9900, }; return ($base * $this->nodes) / 100; } public function create(): void { Cluster::create([ 'workspace_id' => auth()->user()?->current_workspace_id ?? \App\Models\Workspace::factory()->create()->id, 'name' => $this->name, 'slug' => $this->slug, 'region' => $this->region, 'env' => $this->env, 'monthly_price_cents' => $this->monthlyPrice * 100, 'node_count' => $this->nodes, 'backups_enabled' => $this->hourlyBackups, ]); $this->redirect(route('servers.index'), navigate: true); } }; ?>

Cluster anlegen

schritt {{ $step }} von 4
Abbrechen
{{-- Stepper bar --}}
@foreach (['Basis', 'Region & Größe', 'WordPress', 'Review'] as $i => $label) @php $stepNum = $i + 1; @endphp
{{ $stepNum }}
{{ $label }}
@if ($stepNum < 4)
@endif @endforeach
@if ($step === 1)

Basis

URL-Slug: {{ $this->slug }}
@foreach (['prod' => 'Production', 'staging' => 'Staging', 'edge' => 'Edge', 'dev' => 'Development'] as $val => $lbl) @endforeach
@elseif ($step === 2)

Region & Größe

@foreach (['small' => ['4 vCPU · 8 GB', '€49/node'], 'medium' => ['8 vCPU · 32 GB', '€99/node'], 'large' => ['16 vCPU · 64 GB', '€249/node']] as $val => $spec) @endforeach
1 – 10 nodes · später skalierbar
@elseif ($step === 3)

WordPress Defaults

@elseif ($step === 4)

Review

Name{{ $name }}
Environment{{ strtoupper($env) }}
Region{{ $region }}
Größe{{ ucfirst($size) }} × {{ $nodes }}
PHP{{ $phpVersion }}
Auto-Updates{{ $autoUpdates ? 'an' : 'aus' }}
Staging{{ $stagingEnv ? 'an' : 'aus' }}
CDN{{ $cdnEnabled ? 'an' : 'aus' }}
Hourly Backups{{ $hourlyBackups ? 'an' : 'aus' }}
@endif {{-- Wizard nav --}}
@if ($step < 4) @else @endif
{{-- Sticky summary --}}

Zusammenfassung

Name{{ $name ?: '—' }}
Env{{ $env }}
Region{{ $region }}
Size{{ ucfirst($size) }} × {{ $nodes }}
Backups{{ $hourlyBackups ? 'hourly' : 'daily' }}
monatlich €{{ number_format($this->monthlyPrice, 0, ',', '.') }}