@extends('layouts.app') @section('title', 'Chat - Student Panel') @push('styles') @endpush @section('content')

Welcome, {{ auth()->user()->username }}!

Student Chat Panel - Communicate with teachers, classmates, and managers

@if(isset($batches) && $batches->count() > 0) {{ $batches->count() }} Classes @endif {{ $teachers->count() ?? 0 }} Teachers {{ $managers->count() ?? 0 }} Managers
Online
Last seen: Just now
Quick Actions
Today's Classes
09:00 AM - 10:00 AM
Mathematics
Room 101 - Mr. Smith
11:00 AM - 12:00 PM
Physics
Lab 3 - Dr. Johnson
02:00 PM - 03:00 PM
Chemistry
Room 205 - Ms. Davis
Online Classmates
Loading...
Upcoming Assignments
Mathematics
Due: Tomorrow
Physics Lab
Due: 2 days
Recent Conversations
Loading conversations...
@if($conversation)
@if($conversation->conversation_type === 'direct') @if($conversation->participants->firstWhere('user.user_type', 'teacher'))
{{ substr($conversation->title ?? 'T', 0, 1) }}
@elseif($conversation->participants->firstWhere('user.user_type', 'student'))
{{ substr($conversation->title ?? 'S', 0, 1) }}
@else
{{ substr($conversation->title ?? 'M', 0, 1) }}
@endif @else
{{ substr($conversation->title ?? 'G', 0, 1) }}
@endif Online
{{ $conversation->title ?? 'Chat' }}
@if($conversation->conversation_type === 'direct') @if($conversation->participants->firstWhere('user.user_type', 'teacher')) Teacher @elseif($conversation->participants->firstWhere('user.user_type', 'student')) Classmate @else Manager @endif @elseif($conversation->conversation_type === 'batch') Class Group @else Group @endif Online
Loading messages...
@else

Student Chat Center

Connect with your teachers, classmates, and managers for academic support

0
Online Now
0
Unread Messages
0
Active Teachers
@endif
My Teachers
@foreach($teachers as $teacher)
{{ substr($teacher['username'], 0, 1) }}
{{ $teacher['username'] }}
@foreach($batches as $batch) @if(in_array($teacher['id'], $batch->teachers->pluck('user_id')->toArray())) {{ $batch->name }} @endif @endforeach
@endforeach
Classmates
Loading classmates...
Managers
@foreach($managers as $manager)
{{ substr($manager->username, 0, 1) }}
{{ $manager->username }}
LMS Manager
@endforeach
@endsection @push('scripts') @endpush