@extends('layouts.app') @section('title', $video->title . ' - VideoTube') @section('content')
@if($video->thumbnail) {{ $video->title }} @else
@endif
@if($video->embed_server_2) @endif @if($video->embed_server_3) @endif

{{ $video->title }}

{{ number_format($video->views) }} views {{ $video->created_at->format('M d, Y') }} {{ $video->category->name }}
@if($video->description)

{{ $video->description }}

@endif @if($video->tags)
@foreach($video->tags as $tag) #{{ $tag }} @endforeach
@endif

Comments ({{ $video->approvedComments()->count() }})

@auth
@csrf
@else

Login to post a comment.

@endauth
@foreach($comments as $comment)
{{ $comment->user->name ?? $comment->name }} {{ $comment->created_at->diffForHumans() }}

{{ $comment->comment }}

@endforeach
{{ $comments->links() }}

Related Videos

@foreach($relatedVideos as $relatedVideo)

{{ $relatedVideo->title }}

{{ number_format($relatedVideo->views) }} views

{{ $relatedVideo->created_at->diffForHumans() }}

@endforeach
@push('scripts') @endpush @endsection