This commit is contained in:
Lars Behrends
2025-10-18 22:03:30 +02:00
parent f4c1cfc164
commit ca2d3a6960
45 changed files with 4827 additions and 326 deletions

View File

@@ -82,10 +82,22 @@ class MovieController extends Controller
// Decode metadata for display
$metadata = json_decode($movie['metadata'], true);
// Get actors for this movie
$stmt = $this->pdo->prepare("
SELECT a.*
FROM actors a
JOIN actor_movie am ON a.id = am.actor_id
WHERE am.movie_id = :movie_id
ORDER BY a.name ASC
");
$stmt->execute(['movie_id' => $movieId]);
$actors = $stmt->fetchAll(\PDO::FETCH_ASSOC);
return $this->view->render($response, 'movies/show.twig', [
'title' => $movie['title'],
'movie' => $movie,
'metadata' => $metadata
'metadata' => $metadata,
'actors' => $actors
]);
}
}