@extends('layout.master') @section('content')
| # | Title | Description | Preview | Actions |
|---|---|---|---|---|
| {{ $index + 1 }} | {{ $video->title }} | {{ $video->description }} |
@if($video->youtube_link)
@else
No preview available
@endif
|
Edit |
| # | 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 |