@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
Premium Browse Experience

{{ $featuredMovie->title ?? 'Browse Movies' }}

{{ $featuredMovie->description ?? 'Discover trending titles, browse your favorite genres, and find something worth watching with a premium streaming-style experience.' }}

@if(!empty($featuredMovie?->release_year)) {{ $featuredMovie->release_year }} @endif @if(!empty($featuredMovie?->duration)) {{ $featuredMovie->duration }} min @endif @if(!empty($featuredMovie?->age_rating)) {{ $featuredMovie->age_rating }} @endif @if(!empty($featuredMovie?->imdb_rating)) ⭐ {{ $featuredMovie->imdb_rating }}/10 @endif
@if(!empty($featuredMovie?->slug)) Watch Details @endif Explore Catalog

Find your next watch

Search by title, filter by genre, sort by newest or top-rated movies and browse our catalog.

{{ $totalMovies }} Available titles
{{ ($genres ?? collect())->count() }} Genres
{{ !empty($searchTerm) ? '1' : '0' }} Search active
{{ !empty($selectedGenre) ? '1' : '0' }} Genre filter
@if(!empty($selectedGenre)) @endif @if(!empty($selectedSort)) @endif
@if(!empty($searchTerm)) @endif Reset

Browse Catalog

Premium movie discovery with fast scanning and clean filtering.

{{ $movies->count() }} shown · {{ $totalMovies }} total
@if($movies->count())
@foreach($movies as $movie) @php $posterUrl = $resolvePosterUrl($movie); $desc = $movie->description ?? 'No synopsis available yet.'; $detailUrl = !empty($movie->slug) ? route('title.show', $movie->slug) : '#'; $watchUrl = !empty($movie->slug) ? route('watch.movie', $movie->slug) : '#'; $myListKey = $movie->slug ?? $movie->title ?? $movie->name ?? $movie->id; @endphp
@if(!empty($movie->is_featured)) Featured @endif @if(!empty($movie->imdb_rating)) ⭐ {{ $movie->imdb_rating }} @endif @if($posterUrl) {{ $movie->title }} @else
No Image
@endif
▶ i
@if(!empty($movie->release_year)) {{ $movie->release_year }} @endif @if(!empty($movie->duration)) {{ $movie->duration }} min @endif @if(!empty($movie->age_rating)) {{ $movie->age_rating }} @endif

{{ \Illuminate\Support\Str::limit(strip_tags($desc), 90) }}

@endforeach
{{ $movies->links() }}
@else

No titles found

No movies matched your current search or filters. Try clearing the filters, choosing another genre, or searching with a different title.

Reset Browse
@endif
@endsection