@php // Rows are assembled here rather than repeating a five-line block per // field in the markup below; optional fields simply don't appear. $rows = array_filter([ 'Name' => $contactMessage->name, 'Email' => $contactMessage->email, 'Phone' => $contactMessage->phone, 'Subject' => $contactMessage->subject, 'Received' => $contactMessage->created_at?->format('j M Y, g:i a'), 'Browser' => $contactMessage->browser, 'Device' => $contactMessage->device_type ? ucfirst($contactMessage->device_type) : null, 'Came from' => $contactMessage->referer_host, ]); @endphp

New enquiry

{{ $contactMessage->subject }}

@foreach($rows as $label => $value) @endforeach
{{ $label }} {{ $value }}

{{ $contactMessage->message }}

Reply to {{ $contactMessage->name }}

You can also open this message in the admin panel at Contact Messages.