Serve dashboard stats from daily_stats and default visit list to today.

Stop live-scanning page_visits on every dashboard load (including today) so the admin home stays fast; keep the live path only for channel filters and cache the result for 45s.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
root
2026-10-11 09:46:38 +00:00
parent 11caef98fc
commit fcbc479c2e
9 changed files with 550 additions and 76 deletions
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('daily_stats', function (Blueprint $table) {
$table->unsignedBigInteger('pv')->nullable()->after('scope_key');
$table->unsignedBigInteger('effective_pv')->nullable()->after('effective_uv');
});
}
public function down(): void
{
Schema::table('daily_stats', function (Blueprint $table) {
$table->dropColumn(['pv', 'effective_pv']);
});
}
};