@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 ──────────────────────────────────────────────────── --}}
| Video | Owner | Status | Visibility | Type | Views | Likes | Shares | Uploaded | Actions |
|---|---|---|---|---|---|---|---|---|---|
|
@if($video->thumbnail)
@if($video->description)
@endif
|
{{-- Owner --}}
{{ $video->user->name }} | {{-- Status --}}@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 }} | {{-- Visibility --}}@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 }} | {{-- Type --}}@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) }} | {{-- Views --}}{{ number_format(\DB::table('video_views')->where('video_id',$video->id)->count()) }} | {{-- Likes --}}{{ number_format(\DB::table('video_likes')->where('video_id',$video->id)->count()) }} | {{-- Shares --}}{{ number_format(\DB::table('video_shares')->where('video_id',$video->id)->count()) }} | {{-- Date --}}{{ $video->created_at->format('M d, Y') }} | {{-- Actions --}}|
|
No videos found |
|||||||||