<?php

namespace App\Http\Controllers;

use App\Models\FileUpload;

class FileViewController extends Controller
{
    public function show($id)
    {
        $file = FileUpload::findOrFail($id);
        return response()->file(storage_path('app/public/' . $file->file_path));
    }
}