@extends('layouts.admin') @section('title', 'Videos') @push('styles') @endpush @section('content') @php $videos = $videos ?? []; $publishedCount = collect($videos)->where('status', 'Published')->count(); $draftCount = collect($videos)->where('status', 'Draft')->count(); @endphp

Administration

Upload Videos

Upload and publish videos for the public Our Videos page.

@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
Please check the video upload details and try again.
@endif

Add New Video

@csrf
@error('title')

{{ $message }}

@enderror
@error('description')

{{ $message }}

@enderror

Accepted: MP4, WebM, MOV, OGG. Max 200MB.

@error('video')

{{ $message }}

@enderror

Uploaded Videos

{{ $publishedCount }} published, {{ $draftCount }} draft.

Open public page
@forelse ($videos as $video)

{{ $video['title'] ?? 'Farm Video' }}

{{ $video['description'] ?? '' }}

{{ $video['uploaded_at'] ?? '-' }} by {{ $video['uploaded_by'] ?? 'admin' }}

{{ $video['status'] ?? 'Published' }}
@csrf
@empty
No video has been uploaded yet.
@endforelse
@endsection