@extends('layouts.frontend') @php $site_name = App\Models\WebSetting::where('key', 'site_name')->value('value') ?? 'XTube'; $page_title = $video->title ?? 'Undefined' . ' - ' . $site_name; @endphp @section('title', $page_title) @section('content') @include('components.banner', [ 'type' => 'banner_rectangle_small', 'class' => 'mb-6 flex w-full justify-center justify-center', ])
@php $offerLink1 = App\Helpers\AffiliateHelper::render('offer_link_1'); $offerLink2 = App\Helpers\AffiliateHelper::render('offer_link_2'); $redirectLink = $offerLink1 ?: $offerLink2; @endphp @if ($video->type === 'url' && $video->cloudinary_url)
@elseif($video->type === 'iframe' && $video->iframe)
{!! $video->iframe !!}
@else

Video tidak tersedia

@endif

{{ $video->title }}

{{ $video->formatted_views }} views {{ $video->published_at->format('M d, Y') }}
{{ $video->category->name }} @if ($video->tags) @foreach ($video->tags as $tag) #{{ $tag }} @endforeach @endif

{{ $video->description ?: 'No description available.' }}

@include('components.banner', ['type' => 'banner_native_1'])
@include('components.banner', ['type' => 'banner_native_1', 'class' => 'mb-6 flex justify-center'])

Comments ({{ $video->comments()->parentOnly()->count() }})

@auth
{{ substr(auth()->user()->name, 0, 1) }}
@else

Sign in to comment

Login
@endauth
@foreach ($video->comments()->parentOnly()->with('user', 'replies.user')->latest()->get() as $comment) @include('components.comment-item', ['comment' => $comment]) @endforeach
@endsection