@extends('layouts.vertical') @section('css') @endsection @php $recipients = []; @endphp @section('breadcrumb')

Manage group chat

Please use this button to disable group chat for all users: v) && ($visibility->v != true && $visibility->v != "true") ? "checked" : ""}}>

Please use this button to disable one-to-one chat for all users: pcd) && ($visibility->pcd == true || $visibility->pcd == "true") ? "checked" : ""}}>

Please use this button to disable the Parent & Educators group chat for all users. pscd) && ($visibility->pscd == true || $visibility->pscd == "true") ? "checked" : ""}}>

Note: Group chat can be disabled using the School Interface > Messages section in the school.teachkloud.com. If group chat is disabled, group messages using the mobile app will not be available for parents or teachers. Teachers will still be able to send and receive individual and private messages from individual parents using the mobile app. School admin's can also send bulk messages using the School Interface > Messages section but these will deliver to the parent app, as an individual / private message.

Message history

@if(isset($messages) && !empty($messages))
@endif
@endsection @section('content') @if(isset($messages) && !empty($messages)) @foreach($messages as $message) @php $recipients[$message->_id] = $message->mr; @endphp

Message to {{ in_array(1,$message->f) ? 'parents' : ''}} {{ in_array(3,$message->f) ? 'selective parents' : ''}} {{ count($message->f) > 1 ? 'and' : '' }} {{ in_array(2,$message->f) ? 'staff' : '' }}

{{date('d/m/y, h:i a', strtotime($message->c))}}

@if(count($message->mr)) View recipients @else No recipients @endif
@php $msg = $message->t; $url = '@(http(s)?)?(://)?(([a-zA-Z])([-\w]+\.)+([^\s\.]+[^\s]*)+[^,.\s])@'; $msg = preg_replace($url, '$0', $msg); $msg = str_ireplace(array("\r\n\t",'\r\n\t',"\r\n",'\r\n',"\n",'\n',"\t",'\t'),'
',$msg); @endphp

{!! $msg !!}

@if(isset($message->m) && !empty($message->m)) @endif
Message sent to the {{ in_array(1,$message->f) ? 'parents' : ''}} {{ in_array(3,$message->f) ? 'selective parents' : ''}} {{ count($message->f) > 1 ? 'and' : '' }} {{ in_array(2,$message->f) ? 'staff' : '' }} of {{implode(', ', $message->r)}}.
@endforeach @else

Send messages to staff or parents.

New message
@endif @endsection @section('rightconent')
View recipients
List of staff
List of parents
@endsection @section('script-bottom') @endsection