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

@@ -30,7 +30,19 @@ class LatestCommentsApiController extends Controller
return response()->json(['error' => 'Unauthenticated'], 401);
}
$query = ArtworkComment::with(['user', 'user.profile', 'artwork'])
$query = 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');
})