@extends('layouts.app') @section('title', 'إدارة الفيديوهات') @section('content')
@include('components.admin-sidebar')
@if(session('success')) @endif
@if($search || $status || $videoType) @endif
@forelse($videos as $video) @empty @endforelse
ID الصورة المصغرة العنوان المستخدم النوع المشاهدات الحالة مميز تاريخ الإنشاء الإجراءات
{{ $video->id }} {{ $video->title }}
{{ Str::limit($video->title, 50) }}
@if($video->isInGoldenList()) @endif
@if($video->sub_title) {{ Str::limit($video->sub_title, 40) }} @endif
@if($video->user)
@if($video->user->photo) {{ $video->user->name }} @else
{{ substr($video->user->name, 0, 1) }}
@endif {{ $video->user->name }}
@else - @endif
{{ $video->video_type }} @php $videoViewCount = \App\Models\VideoView::where('video_id', $video->id)->where('soft_delete', 0)->count(); @endphp {{ number_format($videoViewCount) }} @if($video->status == 'success') ناجح @elseif($video->status == 'failed') فاشل @else - @endif @if($video->star_video == 'yes') @endif @if($video->video_top == 'yes') @endif {{ $video->createdAt ? $video->createdAt->format('Y-m-d') : '-' }}
@csrf @method('DELETE')

لا توجد فيديوهات

@if($videos->hasPages())
{{ $videos->links('vendor.pagination.bootstrap-5') }}
@endif

{{ number_format($videos->total()) }}

إجمالي الفيديوهات

{{ number_format(\App\Models\Video::active()->where('status', 'success')->count()) }}

فيديوهات ناجحة

{{ number_format(\App\Models\Video::active()->where('star_video', 'yes')->count()) }}

فيديوهات مميزة

{{ number_format(\App\Models\VideoView::where('soft_delete', 0)->count()) }}

إجمالي المشاهدات

@endsection