@extends('layouts.app') @section('title', $grouplist->group->name ?? 'Group Details') @section('content') @php $group = $grouplist->group; $totalMembers = App\Models\GroupLink::where('group_id', $grouplist->group_id)->count(); $isAdmin = $grouplist->role === 'group_admin'; $coverImage = $group->cover_image ? url('storage/'.$group->cover_image) : null; if(request('user_id')){ $sendUrl ==''; }else{ $sendUrl = route('member.group.sendmessage', $grouplist->group_id); } $authProfile = auth()->user()->userprofile; @endphp {{-- ═══════════════════════════════════════════════════════════════ COVER PHOTO + GROUP HEADER ════════════════════════════════════════════════════════════════ --}}
{{-- Cover photo --}}
@if($coverImage) Cover @else
@endif Back
{{-- Group identity bar --}}
{{-- Group avatar — only this overlaps the cover --}}
@if($coverImage) {{ $group->name }} @else @endif
{{-- Name + meta --}}

{{ $group->name }}

@if($group->groupCategory) {{ $group->groupCategory->name }} @endif @if($group->group_type) {{ ucfirst($group->group_type) }} @endif {{ $totalMembers }} member{{ $totalMembers != 1 ? 's' : '' }} @if( !request('user_id')) {{ $isAdmin ? 'Group Admin' : ucfirst($grouplist->role) }} @endif
{{-- Action buttons --}}
{{-- Send Message — always visible, scrolls to inline form --}} @if($isAdmin=='group_admin' && !request('user_id')) @endif @if(!request('user_id')) {{-- Leave Group --}} @endif {{-- Hidden DELETE form --}} @if(!request('user_id')) @endif
{{-- Tab nav --}}
{{-- ═══════════════════════════════════════════════════════════════ TAB PANELS ════════════════════════════════════════════════════════════════ --}}
{{-- ── DISCUSSION TAB ─────────────────────────────────────────── --}} {{-- /tab-discussion --}} {{-- ── MEMBERS TAB ─────────────────────────────────────────────── --}} {{-- ── ABOUT TAB ───────────────────────────────────────────────── --}}
{{-- /tab panels --}} @push('styles') @endpush @push('scripts') @endpush @endsection