fix: drop URL::forceRootUrl (Livewire/CSRF break on tenant subdomains)

forceRootUrl forces ALL generated URLs to APP_URL (service.mir.md).
On psauto.service.mir.md, Livewire-generated POST URLs targeted
service.mir.md instead of psauto, so CSRF/session cookies didn't
match → silent auth failure.

Keep forceScheme('https') so Cloudflare → Traefik → Octane proxy
chain doesn't generate http:// links, but let Laravel use the
actual request host for everything else.

Also: TextInput->lowercase() removed (not in Filament v5);
slug uses dehydrateStateUsing(strtolower) + visual CSS lowercase.
This commit is contained in:
2026-05-06 18:13:47 +00:00
parent 721c57ff97
commit 1a33bc9692
2 changed files with 4 additions and 2 deletions
@@ -34,9 +34,10 @@ class CompanyResource extends Resource
Forms\Components\TextInput::make('slug')
->required()
->alphaDash()
->lowercase()
->maxLength(30)
->unique(ignoreRecord: true)
->dehydrateStateUsing(fn ($state) => strtolower((string) $state))
->extraInputAttributes(['style' => 'text-transform: lowercase'])
->helperText('Subdomeniul: <slug>.service.mir.md'),
Forms\Components\TextInput::make('name')->required()->maxLength(120),
Forms\Components\TextInput::make('display_name')->maxLength(120),