@extends('layouts.app') @section('title', 'Social Hub') @section('page-title', 'Social Media Hub 📱') @section('page-subtitle', 'Track your platform stats and posting frequency') @section('content') {{-- Platform Cards --}}
@foreach($stats as $item) @php $stat = $item['latest']; $platform = $item['platform']; @endphp
{{ $stat?->platform_icon ?? '📱' }}
{{ $platform }}
{{ $stat?->handle ?? 'Not connected' }}
@if($stat)
{{ $stat->formatted_followers }}
Followers
{{ $stat->engagement_rate }}%
Engagement
{{ number_format($stat->avg_views) }}
Avg Views
{{ number_format($stat->avg_likes) }}
Avg Likes

Updated {{ $stat->recorded_date->format('d M Y') }}

@else

No stats yet

@endif
@endforeach
{{-- Update Stats --}}

📊 Update Stats

@csrf
{{-- Posting Frequency --}}

📈 Posting Frequency

@if($postingFrequency->isNotEmpty())
@foreach($postingFrequency as $row) @endforeach
Platform Month Posts
{{ $row->platform }} {{ $row->month }}
{{ $row->count }}
@else
📱

No posted content yet. Mark content as "Posted" to see frequency here.

@endif
@endsection