@if ($msg['message_type'] === 1)
@elseif ($msg['message_type'] === 2)
{{ basename($msg['file_name']) }}
@elseif ($msg['message_type'] === 3)
{{ basename($msg['file_name']) }}
@else
{!! nl2br($msg['message'] ?? '') !!}
@endif
@php
$hasDeletePermission = false;
if(auth()->check()) {
try {
$hasDeletePermission = auth()->user()->hasPermissionTo('admin.can_delete_chat_message.view');
} catch (\Exception $e) {
$hasDeletePermission = false;
}
}
@endphp
@if ($hasDeletePermission)