@extends('admin.layout') @section('title', 'Videos') @php $adminNeedsOtp = auth()->user()->two_factor_enabled && (! session('admin_2fa_verified_at') || now()->timestamp - session('admin_2fa_verified_at') >= 1800); @endphp @section('content') {{-- ── Page header ──────────────────────────────────────────────────── --}}

Videos

{{-- ── Alerts ───────────────────────────────────────────────────────── --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- ── Filter card ──────────────────────────────────────────────────── --}}
@if(request()->hasAny(['search','status','visibility','type','sort'])) Clear @endif
{{-- ── Videos table ─────────────────────────────────────────────────── --}}
All Videos {{ $videos->total() ?? $videos->count() }}
@forelse($videos as $video) {{-- Thumbnail + title --}} {{-- Owner --}} {{-- Status --}} {{-- Visibility --}} {{-- Type --}} {{-- Views --}} {{-- Likes --}} {{-- Shares --}} {{-- Date --}} {{-- Actions --}} @empty @endforelse
Video Owner Status Visibility Type Views Likes Shares Uploaded Actions
@if($video->thumbnail) @else
@endif
{{ $video->title }}
@if($video->description)
{{ Str::limit($video->description, 55) }}
@endif
{{ $video->user->name }} @php $statusMap = [ 'ready' => ['adm-badge-ready', 'bi-check-circle-fill', 'Ready'], 'processing' => ['adm-badge-unlisted','bi-arrow-repeat', 'Processing'], 'pending' => ['adm-badge-unverified','bi-clock', 'Pending'], 'failed' => ['adm-badge-superadmin','bi-x-circle-fill', 'Failed'], ]; [$cls, $ico, $lbl] = $statusMap[$video->status] ?? ['adm-badge-user','bi-dash','Unknown']; @endphp {{ $lbl }} @php $visMap = [ 'public' => ['adm-badge-ready', 'bi-globe2', 'Public'], 'unlisted' => ['adm-badge-unlisted','bi-link-45deg', 'Unlisted'], 'private' => ['adm-badge-private', 'bi-lock-fill', 'Private'], ]; [$vcls, $vico, $vlbl] = $visMap[$video->visibility] ?? ['adm-badge-user','bi-question','—']; @endphp {{ $vlbl }} @php $typeMap = [ 'generic' => ['bi-play-circle','#94a3b8'], 'music' => ['bi-music-note-beamed','#a78bfa'], 'match' => ['bi-trophy','#fbbf24'], ]; [$tico, $tcol] = $typeMap[$video->type] ?? ['bi-play-circle','#94a3b8']; @endphp {{ ucfirst($video->type) }} {{ number_format(\DB::table('video_views')->where('video_id',$video->id)->count()) }} {{ number_format(\DB::table('video_likes')->where('video_id',$video->id)->count()) }} {{ number_format(\DB::table('video_shares')->where('video_id',$video->id)->count()) }} {{ $video->created_at->format('M d, Y') }}

No videos found

{{-- Pagination --}} @if($videos instanceof \Illuminate\Pagination\LengthAwarePaginator && $videos->hasPages())
{{ $videos->onEachSide(1)->links() }}
@endif
{{-- ── Delete confirmation dialog ───────────────────────────────────── --}}
Delete Video

You are about to permanently delete .

All views, likes, comments, and HLS files for this video will also be deleted.
@if($adminNeedsOtp)
@endif
@endsection @section('scripts') @endsection