@extends('layouts.portal') @php $preBatch = $batches->firstWhere('id', (int) request('batch')); $preCourse = old('course_id', $preBatch?->course_id ?? ($courses->count() === 1 ? $courses->first()->id : null)); $preBatchId = old('batch_id', $preBatch?->id); $maxVideo = min($limits['video'], $limits['server']); $maxFile = min($limits['file'], $limits['server']); $kindIcons = ['video' => 'video', 'pdf' => 'file-text', 'file' => 'paperclip', 'link' => 'link']; @endphp @section('title', 'Course materials') @section('subtitle', 'Upload lecture videos, PDFs and lab guides. Learners see them instantly in their course page.') @section('actions') My batches@endsection @section('content') @if($courses->isEmpty())
@else @if($limits['server'] < max($limits['video'], $limits['file']))
Server upload limit: {{ $limits['server'] }} MB. The platform is set up for videos up to {{ $limits['video'] }} MB and documents up to {{ $limits['file'] }} MB, but this server currently accepts files up to {{ $limits['server'] }} MB only. Larger files will be rejected. Compress the file, paste a YouTube or Vimeo link for long videos, or ask the administrator to raise upload_max_filesize and post_max_size.
@endif

Upload new material

Videos up to {{ $maxVideo }} MB · documents up to {{ $maxFile }} MB
$maxVideo, 'file' => $maxFile])'> @csrf
Type @foreach(['video' => ['Video', 'MP4, WEBM, MOV or a YouTube / Vimeo link'], 'pdf' => ['PDF', 'Slides, notes, cheat sheets'], 'file' => ['Other file', 'DOCX, PPTX, XLSX, ZIP, TXT'], 'link' => ['Web link', 'External article or lab']] as $k => [$lab, $hint]) @endforeach
@error('course_id')
{{ $message }}
@enderror
@error('batch_id')
{{ $message }}
@enderror
@error('lesson_id')
{{ $message }}
@enderror
File *
Choose a file or drag it here
MP4, WEBM, MOV, M4V · up to {{ $maxVideo }} MB
@error('file')
{{ $message }}
@enderror
@error('external_url')
{{ $message }}
@enderror
@endif

My uploads {{ $resources->total() }}

@forelse($resources as $r) @empty @endforelse
MaterialCourseVisible toSizeUploaded
{{ $r->title }}
{{ strtoupper($r->kind) }}@if(! $r->published) · unpublished @endif
{{ $r->course?->title }} {{ $r->batch?->batch_code ? 'Batch '.$r->batch->batch_code : 'All course learners' }} {{ $r->humanSize() ?: '—' }} {{ $r->created_at->format('d M Y') }} @if($r->path || $r->external_url)path) target="_blank" rel="noopener" @endif> Open@endif
@csrf @method('DELETE')
You have not uploaded any material yet.
{{ $resources->links() }} @push('scripts')@endpush @endsection