diff --git a/site/app/Http/Controllers/ArtworkController.php b/site/app/Http/Controllers/ArtworkController.php index e664363..d153d2d 100644 --- a/site/app/Http/Controllers/ArtworkController.php +++ b/site/app/Http/Controllers/ArtworkController.php @@ -29,6 +29,8 @@ public function index() $user = auth()->user(); $artworks = Artwork::whereNotNull('approved_by') ->with('artist') + ->with('podcast') + ->with('episode') ->orderBy('episode_id', 'desc') ->orderBy('created_at', 'desc') ->paginate($perPage = 52, $columns = ['*'], $pageName = 'artworks'); @@ -179,8 +181,11 @@ public function destroy(Artwork $artwork) public function approve(Artwork $artwork) { $user = auth()->user(); - $awatingApproval = Artwork::whereNull('approved_by')->with('podcast')->orderBy('created_at', 'asc')->get(); - + $awatingApproval = Artwork::whereNull('approved_by') + ->with('podcast') + ->with('podcast.episode') + ->orderBy('created_at', 'asc') + ->get(); } public function legacyArtLink(Request $request, $any = null)