exists($path)) { abort(404); } $mimeType = $disk->mimeType($path) ?: 'application/octet-stream'; $lastModified = $disk->lastModified($path); return response($disk->get($path), 200, [ 'Content-Type' => $mimeType, 'Cache-Control' => 'public, max-age=604800', 'Last-Modified' => gmdate('D, d M Y H:i:s', $lastModified) . ' GMT', ]); } }