@extends('backend.master') @section('title', $title) @section('content')
@if ($mailbox->parent_id == null) {{ $mailbox->subject }} @else {{ $mailbox['parent']->subject }} @endif
@if (count($mailbox->mailboxAttachments))
@foreach ($mailbox->mailboxAttachments as $attachment) {{ _trans('common.attachment') }} {{ $loop->iteration }} @endforeach
@endif
{{ date('Y-m-d h:i:s A', strtotime($mailbox->created_at)) }}

{{ _trans('common.Message') }} : @if (is_null($mailbox['parent'])) {!! $mailbox->message ?? '' !!} @else {!! $mailbox['parent']->message ?? '' !!} @endif


@foreach ($mailbox->childrens as $children)
{{ _trans('common.Name') }} : {{ $children->createdByUser->name }}
 {{ $children->subject }} {{ date('Y-m-d h:i:s A', strtotime($children->created_at)) }} @if (@$children->status && $children->status == "draft" ) @endif
{{ _trans('common.To:') }} @foreach ($children->mailboxRecipients as $key => $item) {{ $item->email }} @if (!$loop->last) @endif @endforeach

{!! $children->message !!}

@if (count($children->mailboxAttachments))
@foreach ($children->mailboxAttachments as $attachment) {{ _trans('common.attachment') }} {{ $loop->iteration }} @endforeach
@endif

@endforeach
@csrf
@error('subject')
{{ $message }}
@enderror
@error('message')
{{ $message }}
@enderror
{{ _trans('common.Back') }}
@endsection @section('script') @endsection