{{ __('Learning Communities') }}

{{ __('Connect, collaborate, and engage with your school community. Join public forums or dive into your specific class groups.') }}

@if(in_array($persona ?? 'student', ['admin', 'teacher'])) @endif
@if(session('success'))
{{ session('success') }}
@endif
@forelse($communities as $community)
@if(in_array($persona ?? 'student', ['admin', 'teacher'])) @endif
@if($community->getFirstMediaUrl('cover_image')) {{ $community->name }} @else
@endif
{{ $community->community_type }} {{ $community->visibility_type === 'mixed' ? 'Public' : $community->visibility_type }}

{{ $community->name }}

{{ $community->description ?? __('No description provided.') }}

{{ number_format($community->members_count ?? 0) }} {{ __('Members') }}
{{ $community->created_at->diffForHumans() }}
@empty

{{ __('No communities found') }}

{{ __('Create one to get started and invite your students!') }}

@endforelse
@if(method_exists($communities, 'links'))
{{ $communities->links() }}
@endif