@extends('layouts.shell') @section('title', $video->title) @section('main-pad', 'px-5 pb-6') @section('content') @php $liked = auth()->check() && $video->likes()->where('user_id', auth()->id())->exists(); $likeCount = $video->likes()->count(); @endphp {{-- Player --}}
@if($video->category){{ $video->category->name }}@endif

{{ $video->title }}

{{ number_format($video->views_count) }}x ditonton

@csrf
@if($video->description)

{{ $video->description }}

@endif {{-- Konteks series + episode berikutnya --}} @if($video->series_id && $video->series) @php $next = $video->nextEpisode(); @endphp

Bagian dari series

{{ $video->series->title }}

Episode {{ $video->episode_number }}

@if($next) Episode {{ $next->episode_number }} @endif
@endif
{{-- Komentar --}}

Komentar ({{ $video->comments()->count() }})

@csrf
@forelse($video->comments()->with('user')->take(20)->get() as $comment)
{{ strtoupper(substr($comment->user->name ?? '?', 0, 1)) }}

{{ $comment->user->name ?? 'Anonim' }} {{ $comment->created_at->diffForHumans() }}

{{ $comment->body }}

@empty

Belum ada komentar. Jadilah yang pertama.

@endforelse
@if($related->isNotEmpty())
@foreach($related as $v) @endforeach
@endif @push('scripts') @endpush @endsection