paginate(60); return view('movie.index', compact('movies')); } public function show(string $slug) { $movie = Movie::with('director', 'watchProviders') ->where('slug', $slug) ->firstOrFail(); // comments $comments = Comment::where(function($query) use ($movie){ $query->where(function($query) use ($movie){ $query->where('entity_id', $movie->id) ->where('entity_type', Comment::TYPE_MOVIE); }) ->orWhere('tmdb_id', $movie->tmdb_id); }) ->paginate(15); return view('movie.show', compact('movie', 'comments')); } }