From 0183275a7abae89a4328b649aa008f75625bc333 Mon Sep 17 00:00:00 2001 From: Paul Couture Date: Sat, 13 Jan 2024 11:46:02 -0600 Subject: [PATCH] fix: fixes artwork count on podcasts index page --- site/app/Http/Controllers/PodcastController.php | 2 +- site/resources/views/podcasts/podcast.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/app/Http/Controllers/PodcastController.php b/site/app/Http/Controllers/PodcastController.php index e8703a1..7653a77 100644 --- a/site/app/Http/Controllers/PodcastController.php +++ b/site/app/Http/Controllers/PodcastController.php @@ -21,7 +21,7 @@ public function show(Request $request, $slug) $episodes = Episode::where('published', true) ->whereNotNull('artwork_id') ->with('artwork') - ->with('artworks') + ->with('approvedArtworks') ->where('podcast_id', $podcast->id) ->orderBy('episode_number', 'desc')->paginate(100); $podcasts = Podcast::where('published', true)->with('episodes')->get(); diff --git a/site/resources/views/podcasts/podcast.blade.php b/site/resources/views/podcasts/podcast.blade.php index b07b30d..3dd5b56 100644 --- a/site/resources/views/podcasts/podcast.blade.php +++ b/site/resources/views/podcasts/podcast.blade.php @@ -70,7 +70,7 @@ class="avatar" data-bs-toggle="tooltip"
- {{ number_format($episode->artworks->count()) }} Artworks Submitted + {{ number_format($episode->approvedArtworks->count()) }} Artworks Submitted