@extends('layouts.app') @section('title', 'Browse Movies') @section('content') @php $resolvePosterUrl = function ($movie) { $candidates = [ $movie->poster ?? null, $movie->thumbnail ?? null, ]; foreach ($candidates as $path) { if (empty($path)) { continue; } $path = trim($path); if (\Illuminate\Support\Str::startsWith($path, ['http://', 'https://'])) { return $path; } if (\Illuminate\Support\Str::startsWith($path, ['uploads/', '/uploads/'])) { return asset(ltrim($path, '/')); } if (\Illuminate\Support\Str::startsWith($path, ['storage/', '/storage/'])) { return asset(ltrim($path, '/')); } if (\Illuminate\Support\Str::startsWith($path, ['movies/', '/movies/'])) { return asset('storage/' . ltrim($path, '/')); } return asset(ltrim($path, '/')); } return null; }; $heroImage = null; if (!empty($featuredMovie)) { if (!empty($featuredMovie->backdrop)) { $heroBackdrop = trim($featuredMovie->backdrop); if (\Illuminate\Support\Str::startsWith($heroBackdrop, ['http://', 'https://'])) { $heroImage = $heroBackdrop; } elseif (\Illuminate\Support\Str::startsWith($heroBackdrop, ['uploads/', '/uploads/'])) { $heroImage = asset(ltrim($heroBackdrop, '/')); } elseif (\Illuminate\Support\Str::startsWith($heroBackdrop, ['storage/', '/storage/'])) { $heroImage = asset(ltrim($heroBackdrop, '/')); } elseif (\Illuminate\Support\Str::startsWith($heroBackdrop, ['movies/', '/movies/'])) { $heroImage = asset('storage/' . ltrim($heroBackdrop, '/')); } else { $heroImage = asset(ltrim($heroBackdrop, '/')); } } if (!$heroImage) { $heroImage = $resolvePosterUrl($featuredMovie); } } if (!$heroImage) { $heroImage = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900'%3E%3Crect width='100%25' height='100%25' fill='%230d1422'/%3E%3C/svg%3E"; } $totalMovies = method_exists($movies, 'total') ? $movies->total() : count($movies); @endphp
{{ $featuredMovie->description ?? 'Discover trending titles, browse your favorite genres, and find something worth watching with a premium streaming-style experience.' }}
Search by title, filter by genre, sort by newest or top-rated movies and browse our catalog.
Premium movie discovery with fast scanning and clean filtering.
No movies matched your current search or filters. Try clearing the filters, choosing another genre, or searching with a different title.
Reset Browse