@component('mail::message') # {{ $type }} hit max attempts A {{ strtolower($type) }} has reached **10 processing attempts**. @php // Define a map of fields you'd like to show if they exist $fields = [ 'ID' => $model->id ?? null, 'Title' => $model->title ?? null, 'Name / Company' => isset($model->name) || isset($model->company) ? trim(($model->name ?? '') . ' / ' . ($model->company ?? '')) : null, 'Created' => $model->created_at ?? null, 'Attempts' => $model->attempts ?? null, ]; @endphp @foreach($fields as $label => $value) @if(!empty($value)) - **{{ $label }}:** {{ $value }} @endif @endforeach @php // Attempt to detect an admin edit URL dynamically $adminPath = match ($type) { 'Quote' => "admin/quotes/{$model->id}/edit", 'MapPin' => "admin/mappins/{$model->id}/edit", default => "admin", }; @endphp @component('mail::button', ['url' => url($adminPath)]) Review in Admin @endcomponent Thanks, {{ config('app.name') }} @endcomponent