{{-- Every script in this layout that posts with fetch() reads its CSRF token from here, the way the admin layout has always done (admin/layouts/app.blade.php:6). It was never added here, so those requests sent an empty token and were refused with a 419 — including the card payment form the Stripe module renders on an invoice, which reads exactly this tag and has been unable to take a payment in the client area. --}} @yield("title", __("client.my_account")) - {{ company_name() }} @include('partials.seo-meta') @vite(["resources/css/app.css", "resources/js/app.js"]) @if(!empty($customFavicon)) @endif @if(!empty($themeCssVars)) @endif @yield("styles") @if(($textDirection ?? 'ltr') === 'rtl') @endif {!! hook_output('ClientAreaHeadOutput', ['user' => auth()->user()]) !!} @include('partials.dialog-boot') @include('partials.locale-alternates') @if(session('impersonating_admin_id'))
{{ __("client.impersonation.viewing_as") }} {{ auth()->user()->full_name ?? auth()->user()->email }}. ← {{ __("client.impersonation.return_to_admin") }}
@endif
@if(session("success"))
{{ session("success") }}
@endif @if(session("error"))
{{ session("error") }}
@endif {{-- Validation errors. Only the flash keys were drawn here, so every refused form (the free-plan limit, the cycle guard, checkout rules) bounced back to the same page with no explanation at all. --}} {{-- Only the messages the page has not already printed beside its own fields (@error): the page body is rendered before this layout, so it can be checked, and each message appears once. --}} @php $pageBody = (string) \Illuminate\Support\Facades\View::getSection('content', ''); $unshownErrors = collect($errors->all())->unique()->reject(fn ($message) => $pageBody !== '' && str_contains($pageBody, e($message)))->values(); @endphp @if($unshownErrors->isNotEmpty())
@foreach($unshownErrors as $validationError)
{{ $validationError }}
@endforeach
@endif @if(session("info"))
{{ session("info") }}
@endif @if(session("warning"))
{{ session("warning") }}
@endif {{-- Standing reminder for an address that was never proved. Not on the verification pages themselves, where it would only repeat what the page already says. --}} @if(auth()->check() && \App\Http\Controllers\Client\EmailVerificationController::required() && ! auth()->user()->hasVerifiedEmail() && ! request()->routeIs('client.verification.*'))
{{ __('client.email_verify.banner', ['email' => auth()->user()->email]) }} {{ __('client.email_verify.banner_link') }}
@endif @yield("content")
@yield("scripts") {{-- A page may push instead of yielding; without this the block is silently discarded. --}} @stack('scripts') {!! hook_output('ClientAreaFooterOutput', ['user' => auth()->user()]) !!}