@extends('front.layout.master') @section('main_content') @php $setting = App\Models\Setting::where('id',1)->first(); @endphp

Messages

@include('user.sidebar')
@if($message_check > 0)

All Messages

@forelse($message_comments as $item) @php if($item->type == 'User'){ $sender_data = App\Models\User::where('id', $item->sender_id)->first(); } else { $sender_data = App\Models\Admin::where('id', $item->sender_id)->first(); } @endphp
@if($sender_data->photo != '') @else @endif

{{ $sender_data->name }} @if($item->type == 'Admin') (Admin) @endif

{{ $item->created_at->format('Y-m-d H:i A') }}

{!! $item->comment !!}

@empty
No message found
@endforelse

Write a message

@csrf
@else @endif
@endsection