user(); $podcast = Podcast::where('slug', $slug) ->where('published', true) ->firstOrFail(); $episodes = Episode::where('published', true) ->whereNotNull('artwork_id') ->with('artwork') ->with('approvedArtworks') ->where('podcast_id', $podcast->id) ->orderBy('episode_number', 'desc')->paginate(100); $podcasts = Podcast::where('published', true)->with('episodes')->get(); return view('podcasts.podcast', [ 'user' => $user, 'pageTitle' => $podcast->name, 'podcast' => $podcast, 'episodes' => $episodes, 'podcasts' => $podcasts, ]); } }