@php use App\Models\Seller; use App\Models\Buyer; @endphp
Back {{--

Messages

--}}
@if (!empty($conversation))
@if (!empty($conversation))

{{ $conversationData->service->seller->full_name }} ({{ $conversationData->service->title }})

@endif {{-- Delete Conversation --}}
{{--
28 June, 2019
--}} @forelse ($conversationMessages as $message) @php $loginRole = auth('buyer')->check() ? 'buyer' : 'seller'; @endphp @if ($message->sendable_type == get_class(auth($loginRole)->user()) && $message->sendable_id == auth($loginRole)->id())
@if ($message->sendable_type == 'App\Models\Buyer') @if (!empty($image = Buyer::find($message->sendable_id)->image)) @else @endif @else @if (!empty($image = Seller::find($message->sendable_id)->image)) @else @endif @endif

{{ $message->message }}

@else
@if ($message->sendable_type == 'App\Models\Buyer') @if (!empty($image = Buyer::find($message->sendable_id)->image)) @else @endif @else @if (!empty($image = Seller::find($message->sendable_id)->image)) @else @endif @endif

{{ $message->message }}

@endif @empty @endforelse
@endif