@extends('layout.master') @section('content')

Manage Training Materials

Add Video Add Document
@if(session('success'))
{{ session('success') }}
@endif
@foreach ($videos as $index => $video) @endforeach
# Title Description Preview Actions
{{ $index + 1 }} {{ $video->title }} {{ $video->description }} @if($video->youtube_link) YouTube Thumbnail @else No preview available @endif Edit
@foreach ($documents as $index => $document) @endforeach
# Title Description File Actions
{{ $index + 1 }} {{ $document->title }} {{ $document->description }} @if($document->document) @php $fileExtension = pathinfo($document->document, PATHINFO_EXTENSION); $icon = ''; $color = ''; switch(strtolower($fileExtension)) { case 'pdf': $icon = 'file-pdf'; $color = 'text-danger'; break; case 'doc': case 'docx': $icon = 'file-word'; $color = 'text-primary'; break; case 'xls': case 'xlsx': $icon = 'file-excel'; $color = 'text-success'; break; case 'ppt': case 'pptx': $icon = 'file-powerpoint'; $color = 'text-warning'; break; default: $icon = 'file'; $color = 'text-secondary'; } @endphp View @else No file attached @endif
@endsection @push('plugin-scripts') @endpush @push('custom-scripts') @endpush