@extends('layouts.support') @section('title') {{__("words.Support")}} @endsection @section('page_title') Support @endsection @section('content') @php $timezone = auth()->user()->getTimezone(); @endphp

{{__("words.Topics")}}

@php $status = !empty(request()->get('status')) ? request()->get('status') : \App\Models\SupportTopic::STATUS_OPEN; $type = !empty(request()->get('type')) ? request()->get('type') : \App\Models\SupportTopic::TYPE_GENERAL_SUPPORT; @endphp
@php $firstOpenTopic->messages()->where('to_id' , auth()->id())->update(['is_read' => \App\Models\Message::MARK_READ]); $adminSideMessages = $firstOpenTopic->messages()->get(); $loginUserMsgs = \App\Models\Message::where('from_id',auth()->user()->id)->where('to_id',getIdFromSlug('admin'))->get()->pluck('id') ->last(); $adminReplyToLoginUser = 0; if(!empty($loginUserMsgs)) { $adminReplyToLoginUser = \App\Models\Message::where('from_id',getIdFromSlug('admin'))->where('to_id',auth()->user()->id)->where('id','>',$loginUserMsgs)->count(); } else { $adminReplyToLoginUser=1; } @endphp @foreach ($firstOpenTopic->messages()->get() as $message) @if ($message->from_id == auth()->id())
@if ($message->message_type == \App\Models\Message::MESSAGE_TYPE_TEXT)

{{$message->message}}

@include('message.parent') @else @php $file = $message->getFileMessage(); @endphp
@foreach ($file as $fileItem)
{{ !empty($fileItem->file_name) ? $fileItem->file_name: '' }} {{-- --}}
@endforeach
@include('message.parent') @endif

@php $timestamp = strtotime($message->created_at); if (date("Y-m-d", $timestamp) == date("Y-m-d")) { $formattedTime = "Today, "; $formattedTime .= Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $message->created_at, 'UTC') ->setTimezone($timezone) ->format('h:i a'); } else { $formattedTime = Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $message->created_at, 'UTC') ->setTimezone($timezone) ->format('F j, Y, h:i a'); } @endphp {{$formattedTime}}

You
@else
{{$message->fromUser->getSellerName()}}
@if ($message->message_type == \App\Models\Message::MESSAGE_TYPE_TEXT)

{{$message->message}}

@include('message.parent') @else @php $file = $message->getFileMessage(); @endphp
@foreach($file as $image)
{{ !empty($image->file_name) ? $image->file_name: '' }} {{-- --}}
@endforeach
@include('message.parent') @endif

@php $timestamp = strtotime($message->created_at); if (date("Y-m-d", $timestamp) == date("Y-m-d")) { $formattedTime = "Today, "; $formattedTime .= Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $message->created_at, 'UTC') ->setTimezone($timezone) ->format('h:i a'); } else { $formattedTime = Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $message->created_at, 'UTC') ->setTimezone($timezone) ->format('F j, Y, h:i a'); } @endphp {{$formattedTime}}

@endif @endforeach

Notes

@if($type== \App\Models\SupportTopic::TYPE_GENERAL_SUPPORT)

It may take up to 72 hours to receive a response. We appreciate your patience during this time.

Additionally, you are welcome to send a single message initially.

@else

File Upload: Format in JPG, Png, Word or PDF up to 5MB.

You can attach up to 5 files.

It may take some time for your request or documents to be reviewed, usually up to 72 hours.

@endif
{{-- --}}
@push('page_script') @endpush @endsection