@forelse ($trainings as $training)
@if ($training->type == 'surface_sheet' && $training->surface_sheet != null)
@if((pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "png") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "jpg") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "gif") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "svg") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "jpeg") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "JPG"))
@elseif((pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "xls") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "xlsx"))
@elseif(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "pdf")
@elseif(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "docx")
@elseif((pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "pptx") || (pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "ppt"))
@elseif((pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "mp4") || (pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "MP4") ||
(pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "mp3") || (pathinfo($training->surface_sheet, PATHINFO_EXTENSION) == "MP3") )
@endif
Title : {{$training->title}}
@if($training->user)
Uploaded by : {{$training->user->fname.', '.$training->created_at->format('Y-m-d H:i')}}
@else
Uploaded by : {{$training->created_at->format('Y-m-d H:i')}}
@endif