@extends('layouts.main') @section('title', 'Admin Dashboard – World Gymnastics') @section('styles') @endsection @section('content')

ADMIN PANEL

Manage users, posts, and site content

@if(session('success'))
{{ session('success') }}
@endif

{{ $stats['total_users'] }}

Total Users

{{ $stats['total_posts'] }}

Total Posts

{{ $stats['published_posts'] }}

Published

{{ $stats['draft_posts'] }}

Drafts

Recent Posts
View all
@if($recentPosts->isEmpty())
No posts yet.
@else @foreach($recentPosts as $post) @endforeach
Title Author Status Date
{{ Str::limit($post->title, 40) }} {{ $post->user->name }} {{ $post->status }} {{ $post->created_at->format('d M Y') }}
@csrf @method('DELETE')
@endif
Recent Users
View all
@if($recentUsers->isEmpty())
No users yet.
@else @foreach($recentUsers as $user) @endforeach
User Email Role Joined
{{ strtoupper(substr($user->name, 0, 1)) }} {{ $user->name }}
{{ $user->email }} {{ $user->is_admin ? 'Admin' : 'User' }} {{ $user->created_at->format('d M Y') }} @if($user->id !== auth()->id())
@csrf @method('PATCH')
@csrf @method('DELETE')
@else You @endif
@endif
@endsection