some improvements

This commit is contained in:
2025-08-11 21:40:50 +03:00
parent e351803db2
commit 34bcdb062e
12 changed files with 198 additions and 63 deletions
+2 -8
View File
@@ -22,14 +22,8 @@ class MovieController extends Controller
->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);
})
$comments = Comment::where('entity_id', $movie->id)
->where('entity_type', Comment::TYPE_MOVIE)
->paginate(15);
return view('movie.show', compact('movie', 'comments'));