@extends('layouts.portal') @php $maxVideo = min($limits['video'], $limits['server']); $maxFile = min($limits['file'], $limits['server']); $kindIcons = ['video' => 'video', 'pdf' => 'file-text', 'file' => 'paperclip', 'link' => 'link']; $kindLabels = ['video' => 'Video', 'pdf' => 'PDF', 'file' => 'Other file', 'link' => 'Web link']; $hasFilters = ! empty(array_filter($filters)); $bytes = collect($stats)->sum('bytes'); $humanBytes = function ($b) { if ($b <= 0) { return '0 MB'; } $u = ['B', 'KB', 'MB', 'GB', 'TB']; $i = min((int) floor(log($b, 1024)), 4); return round($b / (1024 ** $i), $i > 1 ? 1 : 0).' '.$u[$i]; }; $openUpload = $errors->any() && old('_from') === 'upload'; @endphp @section('title', 'Learning materials') @section('subtitle', 'Lecture recordings, PDFs, lab guides and links for every course and batch.') @section('actions') @endsection @section('content') @if($limits['server'] < max($limits['video'], $limits['file']))
Server upload limit: {{ $limits['server'] }} MB. INFOTICS is configured 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, so larger files will be rejected. Compress the file, paste a YouTube or Vimeo link for long videos, or raise upload_max_filesize and post_max_size in php.ini (and client_max_body_size in nginx) to at least {{ max($limits['video'], $limits['file']) }} MB.
@endif
Videos{{ number_format($stats['video']->c ?? 0) }}Uploaded or embedded
PDFs{{ number_format($stats['pdf']->c ?? 0) }}Slides, notes, cheat sheets
Files and links{{ number_format(($stats['file']->c ?? 0) + ($stats['link']->c ?? 0)) }}{{ number_format($stats['file']->c ?? 0) }} files · {{ number_format($stats['link']->c ?? 0) }} links
Storage used{{ $humanBytes($bytes) }}Uploaded files only

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
@if($resources->isEmpty())
@else
@foreach($resources as $r) @endforeach
MaterialCourse and audienceSizeUploadedStatusActions
{{ $r->title }}
{{ $kindLabels[$r->kind] ?? strtoupper($r->kind) }}@if($r->lesson) · {{ \Illuminate\Support\Str::limit($r->lesson->title, 34) }}@endif
{{ \Illuminate\Support\Str::limit($r->course?->title ?? '—', 44) }}{{ $r->batch?->batch_code ? 'Only batch '.$r->batch->batch_code : 'All course learners' }} {{ $r->humanSize() ?: '—' }} {{ $r->created_at->format('d M Y') }}{{ $r->uploader?->name ?? 'Unknown' }} @if($r->path && ! $r->downloadable)View only@endif
@if($r->path || $r->external_url) @endif
@csrf @method('DELETE')
{{ $resources->links() }} @endif @push('scripts') @endpush @endsection