{{-- One-shot flash messages, rendered above every page's content. Included by layouts/app.blade.php, so a controller only ever has to say: return redirect()->route('projects.index')->with('success', '...'); Recognised keys, in the order they are shown: success a write went through status the key Laravel's own flows use (Fortify password reset) warning it went through, but read this error a single-sentence failure that is not a validation error Field-level validation errors are NOT rendered here: puts each one under its own control, which is where a user looks for it. --- CR-2: the markup is the wireframe's `.info-box` (docs/wireframes-v12 css/style.css "Info Box") rather than a Bootstrap alert. v12 draws exactly one info box, in the blue informational tone and with no way to close it, so the three other tones and the dismiss button are in the app-additions tail of nrems-wireframe.css. The dismiss is ours (`data-nrems-dismiss`, handled by NREMS.UI in nrems-custom.js) and no longer Bootstrap's `data-bs-dismiss="alert"`. That is deliberate: this partial was the last thing in the shell that needed Bootstrap's Alert component, and dropping it means the flash region keeps working when the Metronic bundles are slimmed out. role="alert" inside a polite live region means a screen reader announces the sentence when the page lands without stealing focus. The guest screens do not use this partial — auth/login.blade.php and auth/forgot-password.blade.php render their own `status` line, because the guest shell is out of CR-2's scope (spec §12). --}} @php $flashes = [ 'success' => ['class' => 'info-box-success', 'icon' => 'fa-circle-check'], 'status' => ['class' => 'info-box-success', 'icon' => 'fa-circle-check'], 'warning' => ['class' => 'info-box-warning', 'icon' => 'fa-triangle-exclamation'], 'error' => ['class' => 'info-box-danger', 'icon' => 'fa-circle-exclamation'], ]; @endphp
@foreach ($flashes as $key => $style) @if (session()->has($key) && filled(session($key)) && is_string(session($key))) @endif @endforeach