@php $toasts = collect([ session('success') ? ['type' => 'success', 'title' => 'Success', 'message' => session('success')] : null, session('error') ? ['type' => 'error', 'title' => 'Error', 'message' => session('error'), 'duration' => 7000] : null, session('warning') ? ['type' => 'warning', 'title' => 'Warning', 'message' => session('warning'), 'duration' => 6500] : null, session('info') ? ['type' => 'info', 'title' => 'Info', 'message' => session('info')] : null, ])->filter(); if (session('toasts')) { $toasts = $toasts->merge(collect(session('toasts'))); } @endphp