All checks were successful
Deploy / Deploy to Production (push) Successful in 18s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
676 B
PHP
20 lines
676 B
PHP
<?php
|
|
|
|
$specificData = [
|
|
'games' => $page->children()->listed()->map(function($game) {
|
|
return [
|
|
'title' => $game->title()->value(),
|
|
'slug' => $game->slug(),
|
|
'lettering' => $game->lettering()->toFile()?->url(),
|
|
'description' => $game->description()->value(),
|
|
'thumbnail' => $game->thumbnail()->toFile()?->url(),
|
|
'backgroundColor' => $game->backgroundColor()->value() ?: null,
|
|
'playLink' => $game->playLink()->value() ?: null,
|
|
];
|
|
})->values()
|
|
];
|
|
|
|
$pageData = array_merge($genericData, $specificData);
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($pageData);
|