@extends('layouts.app') @push('head') @endpush @section('title', $video->title . ' | ' . config('app.name')) @section('extra_styles') @endsection @section('content')
@php $typeIcon = match($video->type) { 'music' => 'bi-music-note', 'match' => 'bi-trophy', default => 'bi-film', }; @endphp

{{ $video->title }}

{{ number_format($video->view_count) }} views {{ $video->created_at->format('M d, Y') }}
@auth
@csrf
@if(Auth::id() === $video->user_id) @endif @else Like @endauth @if($video->isShareable()) @endif
@if($video->user) {{ $video->user->name }} @else
@endif
{{ $video->user->name ?? 'Unknown' }}
{{ number_format($video->user->subscriber_count ?? 0) }} subscribers
{{-- Subscribe Button --}} @auth @if(Auth::id() !== $video->user_id) @endif @else @endauth
@if($video->description) @php $fullDescription = $video->description; $shortDescription = Str::limit($fullDescription, 200); $needsExpand = strlen($fullDescription) > 200; @endphp
{{ number_format($video->view_count) }} views {{ $video->created_at->format('M d, Y') }}
@if($needsExpand)
{!! Str::markdown($shortDescription) !!} ...
@else {!! Str::markdown($fullDescription) !!} @endif
@endif

Comments ({{ $video->comment_count }})

@auth
{{ Auth::user()->name }}
@else
Sign in to comment
@endauth
@forelse($video->comments()->whereNull('parent_id')->with('user', 'replies.user')->latest()->get() as $comment) @include('videos.partials.comment', ['comment' => $comment]) @empty

No comments yet. Be the first to comment!

@endforelse

Up Next

More videos coming soon...
@include('layouts.partials.share-modal') @include('layouts.partials.edit-video-modal') @if(Session::has('openEditModal') && Session::get('openEditModal')) @auth @endauth @endif @endsection