mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
...
This commit is contained in:
@@ -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
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user