@extends('layouts.staff_dashboard') @section('title', 'Chat') @section('content')
Current Group

{{ session('staff_data.batch_name') }}

Group Chat

0
Private Chats
Start New Chat
@if($students->count() > 0)

Students

@foreach($students as $student)
{{ substr($student->name, 0, 1) }}
{{ $student->name }} {{ $student->regno }}
@endforeach
@endif @if($otherStaff->count() > 0)

Staff Members

@foreach($otherStaff as $staff)
{{ substr($staff->name, 0, 1) }}
{{ $staff->name }} {{ $staff->desg }}
@endforeach
@endif

{{ $conversation->title }}

{{ $participants->count() }} participants
@if($messages->count() > 0) @foreach($messages as $message)
{{ substr($message->sender_name, 0, 1) }}
{{ $message->sender_name }} {{ $message->sender_type === 'staff' ? 'Staff' : 'Student' }} {{ $message->created_at->format('h:i A') }}

{{ $message->message }}

@if($message->hasAttachment()) @endif
@endforeach @else

No messages yet

Start the conversation by sending a message

@endif
@csrf
@endsection