@php
// Build a filled 14-day array so Chart.js always gets 14 points
$filled14 = [];
$filled14Dates = [];
$trendByDate = $dailyTrend->pluck('count', 'date')->toArray();
for ($di = 13; $di >= 0; $di--) {
$d = now()->subDays($di)->format('Y-m-d');
$filled14Dates[] = now()->subDays($di)->format('d M');
$filled14[] = (int) ($trendByDate[$d] ?? 0);
}
@endphp