@extends('frontend.layouts.app') @section('title') {{ $title ?? 'Page header' }} @endsection {{-- @section('meta') @endsection --}} @push('style') {{-- --}} @endpush @section('content') @include('frontend.layouts.includes.breadcrumb', ['links'=>[[$title=>route('frontend.about')]]])

Messages

Chat List

{{--
--}}

{{ $sender?->name == $receiver?->name ? '' : $receiver?->name }}



@forelse ($messages as $message)
{{ $message->from_id==$receiver->id ? $receiver->name: $sender->name }} {{ now()->parse($message->created_at)->format('d M h:m a') }}
{{ $message->from_id==$receiver->id ?  $receiver->name: $sender->name }}
{!! nl2br($message->body) !!}
@if ($message->from_id==$sender->id)
{{ !$message->read ? 'delivered' : 'seen' }}
@endif @isset($message->attachments) @foreach ($message->attachments as $attachment) @if (in_array(pathinfo($attachment,PATHINFO_EXTENSION), ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'tiff', 'tif', 'webp'])) @else {{ basename($attachment) }} @endif @endforeach @endisset
@empty
Start communicating today!
@endforelse
@if ($receiver) {{-- start msg form --}}
@csrf
@endif
@endsection @push('scripts') @endpush