Unlink function not works in laravel after creating a zip file

By | December 20, 2016

I m using a package called zipper in laravel to create zip files.

Files are stored in a folder and filenames in the db table. after creating zip files , the remaining files i have to delete from the folder.But while using the below code unlink/File::delete() was not working. code looks like as below

In the above code zip file not creating and files not deleting.

Solution: after creating zipFileclass->make() please use $zipFileClass->close();