@extends('layouts.guest') @section('title', $document->file_name) @section('content')

{{ $document->file_name }}

Approved {{ $document->file_extension ?? pathinfo($document->file_name, PATHINFO_EXTENSION) }}
Uploaded: {{ $document->created_at->format('F d, Y \a\t g:i A') }}
@if($document->uploader) Uploaded by: {{ $document->uploader->name }}
@endif @if($document->approver) Approved by: {{ $document->approver->name }} on {{ $document->approved_at->format('M d, Y') }}
@endif Folder: {{ $document->folder->name ?? 'N/A' }}
Status: Approved
Size: {{ number_format($document->file_size ?? 0) }} KB
@if($document->remarks) Remarks: {{ Str::limit($document->remarks, 100) }} @endif
Preview:
@php $extension = strtolower(pathinfo($document->file_name, PATHINFO_EXTENSION)); $isPdf = $extension === 'pdf'; $isImage = in_array($extension, ['jpg', 'jpeg', 'png', 'gif']); @endphp @if($isPdf) @elseif($isImage) Document Image @else

Preview not available for this file type.

Download to View
@endif
@endsection