@extends('layouts.dashboard') @section('title', 'Dashboard') @section('content')

Dashboard

Welcome back, {{ auth()->user()?->full_name ?? 'Admin' }}! Here's what's happening with your portfolio.

Total Posts

{{ $totalPosts ?? 0 }}

{{ $publishedPosts ?? 0 }} published

Comments

{{ $totalComments ?? 0 }}

@if(($pendingComments ?? 0) > 0) {{ $pendingComments }} pending approval @else All approved @endif

Total Likes

{{ $totalLikes ?? 0 }}

Across all posts

Tags

{{ $totalTags ?? 0 }}

Recent Posts

View all
@forelse($recentPosts ?? [] as $post)

{{ $post->title }}

{{ Str::limit(strip_tags($post->content), 100) }}

{{ $post->created_at->format('M d, Y') }} {{ $post->likes_count ?? 0 }} {{ $post->comments_count ?? 0 }}
{{ ucfirst($post->status) }}
@empty

No posts yet. Create your first post

@endforelse

Quick Actions

Recent Comments

View all
@forelse($recentComments ?? [] as $comment)
{{ substr($comment->user_name ?? $comment->user?->full_name ?? 'U', 0, 1) }}

{{ $comment->user_name ?? $comment->user?->full_name ?? 'Anonymous' }}

{{ Str::limit($comment->body, 80) }}

On: {{ Str::limit($comment->post?->title ?? 'Unknown Post', 30) }}

@if(!$comment->is_approved) @endif
@empty

No comments yet

@endforelse

Popular Tags

@forelse($popularTags ?? [] as $tag) {{ $tag->name }} ({{ $tag->posts_count ?? 0 }}) @empty

No tags created yet

@endforelse
@endsection