feat: add reusable gallery carousel and ranking feed infrastructure
This commit is contained in:
23
scripts/check_stats.php
Normal file
23
scripts/check_stats.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
$id = 69478;
|
||||
|
||||
$artwork = DB::table('artworks')->where('id', $id)->first();
|
||||
echo "Artwork: " . ($artwork ? $artwork->title : 'NOT FOUND') . PHP_EOL;
|
||||
|
||||
$stats = DB::table('artwork_stats')->where('artwork_id', $id)->first();
|
||||
echo "artwork_stats row: " . json_encode($stats) . PHP_EOL;
|
||||
|
||||
$viewEvents = DB::table('artwork_view_events')->where('artwork_id', $id)->count();
|
||||
echo "artwork_view_events count: " . $viewEvents . PHP_EOL;
|
||||
|
||||
// Check a few artworks that DO have stats
|
||||
$sample = DB::table('artwork_stats')->whereColumn('views', '>', 'id')->limit(3)->pluck('artwork_id');
|
||||
echo "Sample artworks with views > 0: " . json_encode($sample) . PHP_EOL;
|
||||
|
||||
// Count how many artworks_stats rows exist at all
|
||||
$total = DB::table('artwork_stats')->count();
|
||||
echo "Total artwork_stats rows: " . $total . PHP_EOL;
|
||||
Reference in New Issue
Block a user