{{-- Tabbed description + insights box. Expects: $video (Video model) Optionally accepts: $descriptionSlot — raw HTML to show in the About tab body --}} @php $isVideoOwner = Auth::check() && Auth::id() === $video->user_id; $renderedDescription = \App\Support\HtmlSanitizer::render($video->description ?? ''); $hasDesc = $renderedDescription !== '' || isset($descriptionSlot); $showBox = $hasDesc || $isVideoOwner; @endphp @if ($showBox)
@if($isVideoOwner) @endif
{{ number_format($video->view_count) }} views {{ $video->created_at->format('M d, Y') }} @if($video->duration){{ $video->formatted_duration }}@endif
@if(isset($descriptionSlot)) {!! $descriptionSlot !!} @elseif($renderedDescription !== '')
{!! $renderedDescription !!}
@else

No description added.

@endif
@if($isVideoOwner) @endif
@endif