@extends('layouts.app') @section('content')
@if (isset($list))
{{-- TEL: bulk delete --}}
@csrf @method('DELETE')
@csrf @method('DELETE') Delete all messages older than
@foreach ($records as $record) @endforeach
SN Name Email Phone Subject Date Message Action
{{ $loop->iteration }} {{ $record->name }} {{ $record->email }} {{ $record->phone }} {{ excerpt($record->subject, 30) }} {{ $record->created_at->format('d M Y l g:i A') }}
@csrf @method('DELETE')
{{ $records->links() }}
@elseif(isset($show))
@php $attachment = $record->attachment; $extension = pathinfo($attachment, PATHINFO_EXTENSION); $imageOrPdf = in_array(strtolower($extension), ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp', 'pdf']); @endphp
Fields : Values
Name : {{ $record->name }}
Email : {{ $record->email }}
Phone : {{ $record->phone }}
Company Name : {{ $record->company_name }}
Subject : {{ $record->subject }}
Message : {{ $record->message }}
Attachment : @if ($attachment) @if ($imageOrPdf) View @else Download @endif @else No attachment @endif
Date : {{ $record->created_at->format('d M Y l g:i A') }}
@endif
@endsection @push('scripts') @endpush