Download the PHP package ka-eecii/laravel-zip without Composer
On this page you can find all versions of the php package ka-eecii/laravel-zip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ka-eecii/laravel-zip
More information about ka-eecii/laravel-zip
Files in ka-eecii/laravel-zip
Package laravel-zip
Short Description laravel-zip is the world's leading zip utility for file compression and backup.
License MIT
Homepage http://www.zanysoft.net
Informations about the package laravel-zip
zanysoft/laravel-zip
laravel-zip is the world's leading zip utility for file compression and backup.
This library was written to simplify and automate Zip files management using PHP ZipArchive.
Installation
Require this package in your composer.json and update composer. This will download the package.
composer require zanysoft/laravel-zip
After updating composer, add the ServiceProvider to the providers array in config/app.php
ZanySoft\Zip\ZipServiceProvider::class,
You can optionally use the facade for shorter code. Add this to your facades:
'Zip' => ZanySoft\Zip\Facades\Zip::class,
Zip usage
use ZanySoft\Zip\Zip
class only use Zip
is made to handle a zip file.
- include the Zip class at top:
Basic operations
-
Open zip file:
-
Create zip file:
-
Check zip file:
-
Extract zip file:
-
Check if zip has a file:
-
Add a file/directory to zip:
-
Add content to zip:
-
Add multiple files/directories to zip:
-
Delete a file/directory from zip:
-
Delete multiple files/directories from zip:
-
List content of zip file
- Close zip file
Additional methods
-
Skip hidden files while adding directories:
-
Use password for zip extraction:
- Use a mask != 0777 for created folders:
ZipManager usage
The \ZanySoft\Zip\ZipManager
can handle multiple ZanySoft\Zip\Zip
objects.
- include the Zip and ZipManager class at top:
Basic operations
-
Init the manager and register Zips:
-
Basic zips management:
-
Add files to all zips:
-
Extract zips:
-
Merge zips:
- Close zips:
Additional methods
-
Declare path from which add files:
- Use a mask != 0777 for created folders