@foreach ($comments as $comment) {{--Admin Reply status--}} @if($comment->user_id != null) @if ($loop->first)
@if ($comment->user != null) @if ($comment->user->image == null) default @else {{$comment->user->image}} @endif @else default @endif
@if($comment->user != null)
{{ $comment->user->name }}@if(!empty($comment->user->getRoleNames()[0])){{ $comment->user->getRoleNames()[0] }}@endif
@else
~
@endif @if($comment->created_at->timezone(setting('default_timezone'))->format('Y-m-d') == now()->timezone(setting('default_timezone'))->format('Y-m-d')) {{ $comment->created_at->timezone(setting('default_timezone'))->format('h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @if($comment->lastseen == null){{lang('Sent')}}@endif @else {{ $comment->created_at->timezone(setting('default_timezone'))->format('D, d M Y, h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @if($comment->lastseen == null){{lang('Sent')}}@endif @endif @if($comment->lastseen != null) {{lang('Seen')}} {{lang($comment->lastseen->timezone(setting('default_timezone'))->diffForHumans())}}@endif
{!! $comment->comment !!}
@csrf
@if (Auth::id() == $comment->user_id)
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@else
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@endif
@if (Auth::id() == $comment->user_id || Auth::user()->getRoleNames()[0] == 'superadmin') @if($comment->display != null)
@endif @endif @if($ticket->status == 'Closed')
@endif
@else
@if($comment->user != null) @if ($comment->user->image == null) default @else {{$comment->user->image}} @endif @else default @endif
@if($comment->user != null)
{{ $comment->user->name }}@if(!empty($comment->user->getRoleNames()[0])){{ $comment->user->getRoleNames()[0] }}@endif
@else
~
@endif @if($comment->created_at->timezone(setting('default_timezone'))->format('Y-m-d') == now()->timezone(setting('default_timezone'))->format('Y-m-d')) {{ $comment->created_at->timezone(setting('default_timezone'))->format('h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @if($comment->lastseen == null){{lang('Sent')}}@endif @else {{ $comment->created_at->timezone(setting('default_timezone'))->format('D, d M Y, h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @if($comment->lastseen == null){{lang('Sent')}}@endif @endif @if($comment->lastseen != null) {{lang('Seen')}} {{lang($comment->lastseen->timezone(setting('default_timezone'))->diffForHumans())}}@endif
{!! $comment->comment !!}
@csrf
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@if (Auth::user()->getRoleNames()[0] == 'superadmin') @if($ticket->status != 'Closed')
@endif @endif @if($ticket->status == 'Closed')
@endif
@endif {{--Admin Reply status end--}} {{--Customer Reply status--}} @else
@if ($comment->cust->image == null) default @else {{$comment->cust->image}} @endif
{{ $comment->cust->username }}{{ $comment->cust->userType }}
@if($comment->created_at->timezone(setting('default_timezone'))->format('Y-m-d') == now()->timezone(setting('default_timezone'))->format('Y-m-d')) {{ $comment->created_at->timezone(setting('default_timezone'))->format('h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @else {{ $comment->created_at->timezone(setting('default_timezone'))->format('D, d M Y, h:i A') }} ({{ $comment->created_at->timezone(setting('default_timezone'))->diffForHumans() }}) @endif
{!! $comment->comment !!}
@if($comment->emailcommentfile != null) @if($comment->emailcommentfile == 'mismatch')

Upload Failed

@else @php $arraytype = explode(',', $comment->emailcommentfile); @endphp @foreach($arraytype as $arraytypes) @php $arrayextension = explode('.', $arraytypes); $finalextension = $arrayextension[1]; @endphp
@if($finalextension == 'jpg' || $finalextension == 'jpeg' || $finalextension == 'JPG') @elseif($finalextension == 'pdf') @elseif($finalextension == 'csv') @elseif($finalextension == 'png') @else @endif

{{ $arrayextension[0] }}

.{{ $arrayextension[1] }}
@endforeach @endif @endif @foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@endif {{--Customer Reply status end--}} @endforeach