Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
user();
$cases = $user->cases()->withCount(['documents', 'suggestions'])->latest()->take(6)->get();
$activeSubscription = $user->subscriptions()->with('plan')->whereIn('status', ['active', 'trialing'])->latest()->first();
return view('dashboard', [
'cases' => $cases,
'caseCount' => $user->cases()->count(),
'documentCount' => $user->cases()->withCount('documents')->get()->sum('documents_count'),
'suggestionCount' => $user->cases()->withCount('suggestions')->get()->sum('suggestions_count'),
'activeSubscription' => $activeSubscription,
'plans' => Plan::where('is_active', true)->orderBy('sort_order')->get(),
]);
}
}