<?php fpassthru(resource $stream): int
<?php $stream = $filesystem->readStream($file); return response()->stream(function () use ($stream) { fpassthru($stream); }, 200, [ 'Content-Type' => $filesystem->getMimetype($file), 'Content-Length' => $filesystem->getSize($file),
<?php if (ftell($stream) !== 0) { rewind($stream); } fpassthru($stream); fclose($stream); });