diff options
| author | Developer | 2026-06-27 03:22:01 +0200 |
|---|---|---|
| committer | Developer | 2026-06-27 03:22:01 +0200 |
| commit | df321aa19b9734981b81847389176021a14f44d4 (patch) | |
| tree | 712ce46219b3124127f2348b37cbaf0f658405c0 | |
| parent | 2bd360718a80a0013bf91decb5d9e99ec8333826 (diff) | |
| download | curious-df321aa19b9734981b81847389176021a14f44d4.tar.gz | |
feat: exclude movies without a Wikipedia article from cinema listings
Only show movies where wiki_article IS NOT NULL in the main listing and search results.
| -rw-r--r-- | app/Http/Controllers/CinemaController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Http/Controllers/CinemaController.php b/app/Http/Controllers/CinemaController.php index c6fec3b..c433eea 100644 --- a/app/Http/Controllers/CinemaController.php +++ b/app/Http/Controllers/CinemaController.php @@ -28,12 +28,14 @@ class CinemaController extends Controller ->orderBy('imdb.average_rating', 'desc') ->orderBy('imdb.num_votes', 'desc') ->whereNotNull('imdb.primary_title') + ->whereNotNull('imdb.wiki_article') ->where('imdb.title_type', 'movie') ->simplePaginate(12); $total = DB::connection('cinema') ->table('imdb') ->whereNotNull('primary_title') + ->whereNotNull('wiki_article') ->where('title_type', 'movie') ->count(); @@ -98,6 +100,7 @@ class CinemaController extends Controller 'imdb.runtime_minutes' ) ->whereNotNull('imdb.primary_title') + ->whereNotNull('imdb.wiki_article') ->where('imdb.title_type', 'movie') ->where(function ($q) use ($query) { $q->where('imdb.primary_title', 'like', '%' . $query . '%') @@ -109,6 +112,7 @@ class CinemaController extends Controller $total = DB::connection('cinema') ->table('imdb') ->whereNotNull('primary_title') + ->whereNotNull('wiki_article') ->where('title_type', 'movie') ->where(function ($q) use ($query) { $q->where('primary_title', 'like', '%' . $query . '%') |
