@if($resource != null) @if($data->channel == 'Facebook' && $data->type == 'Message') @php $data2 = $data->facebook->username; $checks = \App\Models\Tenant\Facebook::where('username',$data2)->get(); @endphp {{-- @dd($data2)--}} @foreach($checks as $check) @foreach($check->messages as $message) @if($message->type == 'Inbound')
@if($resource != null)

{{ $check->created_at->format('M d, y h:i A') }}

@endif
mdo
@if($message->attachment != null) {{-- The browser does not support it, click on it to download --}} Click to view the attachment {{ $message->text }} @else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@else

{{$message->user != null ? $message->user->first_name . " " .$message->user->last_name :""}}

@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @endforeach @elseif($data->channel == 'Facebook' && $data->type == 'Comment')
@if($resource != null)

{{ $data->created_at->format('M d, y h:i A') }}

@endif
@foreach($data->facebook->comments as $message) @if($message->type == 'Inbound')
mdo
@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif
{{$message->created_at->format('M d, y h:i A')}} @if(!$message->action->delete) Like action->send_message) data-bs-toggle="modal" data-bs-target="#sendMessage" @endif class="px-1" style="float: right;margin-right: 7px; @if($message->action->send_message) color:#dadada @else ;cursor: pointer @endif">Message @endif
@else

{{$data->resource->user_id != 0 ? $data->resource->user->first_name . " ". $data->resource->user->last_name:""}}

@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @elseif($data->channel == 'Instagram' && $data->type == 'Comment')
@if($resource != null)

{{ $data->created_at->format('M d, y h:i A') }}

@endif
@foreach($data->instagram->comments as $message) @if($message->type == 'Inbound')
mdo
@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif
{{$message->created_at->format('M d, y h:i A')}} {{-- @if(!$message->action->delete)--}} {{-- Like--}} {{-- action->send_message) data-bs-toggle="modal" data-bs-target="#sendMessage" @endif class="px-1" style="float: right;margin-right: 7px; @if($message->action->send_message) color:#dadada @else ;cursor: pointer @endif">Message--}} {{-- @endif--}}
@else

{{$data->resource->user_id != 0 ? $data->resource->user->first_name . " ". $data->resource->user->last_name:""}}

@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @elseif($data->channel == 'Instagram' && $data->type == 'Message') @php $data2 = $data->instagram->username; $checks = \App\Models\Tenant\Instagram::where('username',$data2)->get(); @endphp @foreach($checks as $check) @foreach($check->messages as $message) @if($message->type == 'Inbound')
@if($resource != null)

{{ $check->created_at->format('M d, y h:i A') }}

@endif
mdo
@if($message->attachment != null) {{-- The browser does not support it, click on it to download --}} Click to view the attachment {{ $message->text }} @else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@else

{{$message->user != null ? $message->user->first_name . " " .$message->user->last_name :""}}

@if($message->attachment != null) {{-- attachment) }}" alt="{{$message->attachment}}" height="90px"> --}} attachment) }}" target="_blank" rel="noopener noreferrer" style="display: block;">Click to view the attachment

{{ $message->text }}

@else {{ $message->text }} @endif

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @endforeach @elseif($data->channel == 'Google' && $data->type == 'Review')
@if($resource != null)

{{ $data->created_at->format('M d, y h:i A') }}

@endif
@foreach($data->google->googleReviews as $message) @if($message->type == 'Inbound')

{{$data->resource->user_id != 0 ? $data->resource->user->first_name . " ". $data->resource->user->last_name:""}}

mdo
{!! $message->text !!}

{{$message->created_at->format('M d, y h:i A')}}

@else
{{$message->text}}

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @elseif($data->channel == 'Linkedin' && $data->type == 'Comment')
@if($resource != null)

{{ $data->created_at->format('M d, y h:i A') }}

@endif
@foreach($data->linkedin->comments as $message) @if($message->type == 'Inbound')

{{$data->resource->user_id != 0 ? $data->resource->user->first_name . " ". $data->resource->user->last_name:""}}

{!! $message->text !!}

{{$message->created_at->format('M d, y h:i A')}}

@else
{{$message->text}}

{{$message->created_at->format('M d, y h:i A')}}

@endif @endforeach @elseif($data->channel == 'Youtube' && $data->type == 'Comment')
@if($resource != null)

{{ $data->created_at->format('D H:i A') }}

@endif
@foreach($data->youtube->youtubeComments ?? [] as $message) @if($message->type == 'Inbound')
mdo
{!! $message->text !!}

{{$message->created_at->format('D h:i A')}}

@else

{{$data->resource->user_id != 0 ? $data->resource->user->first_name:""}}

{{$message->text}}

{{$message->created_at->format('D h:i A')}}

@endif @endforeach @endif @endif