@extends('adminlte::page') @section('title', 'Contact us') @section('content_header')
| Serial No | Reason | Name | Mobile number | Message | Added at | User time | Source URL | Action | ||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $no }} | @if(isset($contact->reason->name) && !empty($contact->reason->name)) {{ $contact->reason->name }} @else N/A @endif | {{$contact->first_name }} {{$contact->last_name }} | {{$contact->email }} | +{{$contact->country_code }} {{$contact->mobile_no }} | @php $message = $contact->message ?? 'Null'; $words = explode(' ', $message); $shortMessage = implode(' ', array_slice($words, 0, 30)); @endphp | {{ \Carbon\Carbon::parse($contact->created_at)->format('d/m/Y h:i A') }} | @if ($contact->user_time) @php try { $dt = \Carbon\Carbon::createFromFormat('n/j/Y, g:i:s A', $contact->user_time); } catch (\Exception $e) { $dt = \Carbon\Carbon::parse($contact->user_time); // fallback for standard format } @endphp {{ $dt->format('h:i A') }} @endif | @php $url = $contact->current_url; $cleanPath = $url; $baseUrls = [ 'https://visament.com', 'http://172.105.63.118/visament_working_dir/public', ]; foreach ($baseUrls as $base) { if (Str::startsWith($url, $base)) { $cleanPath = Str::replaceFirst($base, '', $url); break; } } @endphp{{ $cleanPath }} |
|
{{--Delete | --}} @php $no++; @endphp