@extends('admin.layouts.app') @section('page_title', 'Videos') @section('content')
{{-- Header --}}

Video Management

Create, search, update and manage your YouTube & custom videos.

{{-- Alerts --}} @if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())

Please fix the following errors:

@endif {{-- Toolbar (like Category) --}}
Reset
{{-- Table --}}
Videos List
@forelse ($videos as $idx => $video)

Video Preview

@empty @endforelse
# Title Type Category Description Preview Actions
{{ ($videos->currentPage() - 1) * $videos->perPage() + $idx + 1 }}
{{ $video->title }}
@if ($video->type === 'youtube' && $video->url) Open link @endif
{{ ucfirst($video->type) }} {{ $video->category->name ?? '—' }} {{ $video->description ? \Illuminate\Support\Str::limit($video->description, 110) : '—' }} @if ($video->type === 'youtube') @elseif ($video->type === 'custom' && $video->video_file) @else No Preview Available @endif
@csrf @method('DELETE')

No videos found.
{{-- Pagination --}} @if ($videos->hasPages())

Showing {{ $videos->firstItem() }}–{{ $videos->lastItem() }} of {{ $videos->total() }}

{{ $videos->withQueryString()->links() }}
@endif
{{-- Add Modal --}}

Add New Video

@csrf
{{-- Edit Modal --}}

Edit Video

@csrf @method('PUT')
{{-- Category --}}
{{-- Description --}}
@endsection @push('scripts') @endpush