@php $types = [ 'success' => ['success', 'check-circle-fill'], 'status' => ['info', 'info-circle-fill'], 'error' => ['danger', 'exclamation-triangle-fill'], ]; @endphp @foreach ($types as $key => [$color, $icon]) @if (session($key)) @endif @endforeach