From 7a4120a29cd3e3e560464c1dcf5264b75d295ebd Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 4 Jun 2023 22:17:27 +0200 Subject: [PATCH] Edit route + add cover --- resources/views/games/create.blade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/views/games/create.blade.php b/resources/views/games/create.blade.php index 3a2a506..6c18643 100644 --- a/resources/views/games/create.blade.php +++ b/resources/views/games/create.blade.php @@ -27,6 +27,9 @@ document.getElementById("genres").value = genre_names; //document.querySelector('[alt="Game Cover "]').src = game.cover_image_path; + var cover_url = game['cover']['url']; + var replaced_url = cover_url.replace("thumb", "cover_big"); + document.getElementById("cover").src = replaced_url; } @@ -123,7 +126,7 @@
- Game Cover + Game Cover