Add tests for featured thumbnail generation; apply Pint formatting and related edits

This commit is contained in:
2026-05-06 18:55:40 +02:00
parent 7a8bc8e22a
commit 82f2b1f660
65 changed files with 11325 additions and 49545 deletions

View File

@@ -21,7 +21,19 @@ class LatestCommentsController extends Controller
// Build initial (first-page, type=all) data for React SSR props
$initialData = Cache::remember('comments.latest.all.page1', 120, function () {
return ArtworkComment::with(['user', 'user.profile', 'artwork'])
return ArtworkComment::query()
->select([
'artwork_comments.id',
'artwork_comments.artwork_id',
'artwork_comments.user_id',
'artwork_comments.content',
'artwork_comments.created_at',
])
->with([
'user:id,username,name',
'user.profile:user_id,avatar_hash',
'artwork:id,title,slug,hash,file_path,file_name',
])
->whereHas('artwork', function ($q) {
$q->public()->published()->whereNull('deleted_at');
})