Skip to content

Documentation ​

Also published at exeque.github.io/laravel-zipstream, with navigation and search.

  • Adding content - Disks, local paths, whole directories, raw content and your own models
  • Entry options - Sizes, compression, context and verification, per entry
  • Output - Response, local path, disk, string or stream - and what a failed write leaves behind
  • Events - Listening, handling errors and stopping an archive early
  • Progress - The context an event carries, and reporting how far along an archive is
  • S3 - Reading and writing buckets: part sizes, options and request counts
  • Local filesystem - Absolute paths, and why saveToLocal() is the safer target
  • Configuration - Config file, fluent defaults, translations and macros
  • Testing - Zip::fake() and asserting what an archive contained

Also in this repository:

Where things are ​

Looking forPage
fromDisk(), fromLocal(), fromRaw()Adding content
fromDiskDirectory(), fromLocalDirectory()Adding content
StreamableToZip, CanStreamToZipAdding content
exactSize(), maxSize()Entry options
toResponse(), saveToDisk(), saveToLocal(), toString()Output
part_size, mup_threshold, paramsS3
stream_reads and why it mattersS3
withContentLength(), withKnownSize()Output
manageOutput(), timeLimit()Output
on(), the event listEvents
What a handler is handed, and binding the queueEvents
Context, StreamedBytesProgress
progressEveryBytes(), progressEveryInterval()Progress
abort(), abort(discard: true)Events
ProcessError, FileUnavailableExceptionEvents
store(), deflate(), withZeroHeader() and every other fluent optionConfiguration
progress_every and the rest of the config fileConfiguration
as() and how the filename is sentOutput
withoutVerification()Entry options
context() on an entry, withContext()Entry options
Zip::fake()Testing
toHuman(), percentageToHuman() and the restProgress
Translations for those stringsConfiguration