@extends('layouts.yellow') @section('content')
@if(session('success'))
{{ session('success') }}
@endif
@php function getFileIcon($filename) { $extension = pathinfo($filename, PATHINFO_EXTENSION); $iconClass = 'fas fa-file text-secondary'; switch(strtolower($extension)) { case 'pdf': $iconClass = 'fas fa-file-pdf text-danger'; break; case 'doc': case 'docx': $iconClass = 'fas fa-file-word text-primary'; break; case 'xls': case 'xlsx': $iconClass = 'fas fa-file-excel text-success'; break; case 'ppt': case 'pptx': $iconClass = 'fas fa-file-powerpoint text-warning'; break; case 'jpg': case 'jpeg': case 'png': case 'gif': case 'bmp': $iconClass = 'fas fa-file-image text-info'; break; case 'zip': case 'rar': case '7z': $iconClass = 'fas fa-file-archive text-secondary'; break; case 'txt': $iconClass = 'fas fa-file-alt text-secondary'; break; case 'mp3': case 'wav': case 'ogg': $iconClass = 'fas fa-file-audio text-primary'; break; case 'mp4': case 'avi': case 'mov': $iconClass = 'fas fa-file-video text-danger'; break; case 'html': case 'css': case 'js': $iconClass = 'fas fa-file-code text-info'; break; } return $iconClass; } @endphp @endsection @push('styles') @endpush @push('scripts') @endpush