@extends('admin.layouts.cmlayout') @section('body')

User Communication

iconCommunication

@forelse ($messages as $message)
@if($message->sender_id == $userid)
...
@endif
@php $string = explode(' ', $message->message); $string1 = $message->message; foreach($blockedwords as $word){ if(array_search(strtolower($word['word']), array_map('strtolower', $string))) { $string1 = str_ireplace ($word, ''.strtolower($word['word']).'', $string1); } } @endphp

{!! $string1 !!}

{{date('F j, Y, g:i a', strtotime($message->created_at))}}
@if($message->sender_id != $userid)
...
@endif
@empty

No records found!!

@endforelse
{{$messages->links()}}
@endsection