@extends('admin.layout') @section('title', 'Dashboard') @section('page-title', 'Dashboard Overview') @section('content')
@php $cards = [ ['label' => 'Projects', 'value' => $stats['projects'], 'icon' => 'fas fa-folder-open', 'color' => 'indigo', 'bg' => 'bg-indigo-500/10'], ['label' => 'Blogs', 'value' => $stats['blogs'], 'icon' => 'fas fa-blog', 'color' => 'purple', 'bg' => 'bg-purple-500/10'], ['label' => 'Team', 'value' => $stats['team_members'], 'icon' => 'fas fa-users', 'color' => 'cyan', 'bg' => 'bg-cyan-500/10'], ['label' => 'Messages', 'value' => $stats['messages'], 'icon' => 'fas fa-envelope', 'color' => 'emerald', 'bg' => 'bg-emerald-500/10'], ]; @endphp @foreach($cards as $card)
@if($card['label'] === 'Messages' && $stats['unread_messages'] > 0) {{ $stats['unread_messages'] }} @endif

{{ $card['value'] }}

Total {{ $card['label'] }}

@endforeach

Recent Blog Posts

View All →
@forelse($recent_blogs as $blog)

{{ $blog->title }}

{{ $blog->created_at->format('M d, Y') }}

{{ $blog->is_published ? 'Published' : 'Draft' }}
@empty

No posts yet

@endforelse

Quick Actions

@php $actions = [ ['route' => 'admin.projects.create', 'icon' => 'fas fa-plus', 'label' => 'Add Project', 'color' => 'indigo'], ['route' => 'admin.blog.create', 'icon' => 'fas fa-pen', 'label' => 'New Post', 'color' => 'purple'], ['route' => 'admin.team.create', 'icon' => 'fas fa-user-plus', 'label' => 'Add Member', 'color' => 'cyan'], ['route' => 'admin.messages.index', 'icon' => 'fas fa-inbox', 'label' => 'Messages', 'color' => 'emerald'], ]; @endphp @foreach($actions as $action)
{{ $action['label'] }}
@endforeach
@endsection