How to upload and Extract Zip file in CodeIgniter

In CodeIgniter, there is a zip library for creating a zip file but there is no library available for extracting the zip file.

To extract need to use ZipArchive Class.

Load the file and extract it to a location using the ZipArchive Class object.

In this tutorial, I show how you can upload and extract a zip file to a specific location in CodeIgniter.

How to upload and Extract Zip file in CodeIgniter

Read more

Create and Download Zip file in CodeIgniter

In PHP, ZipArchive Class is used for creating a zip file.

For adding a whole directory files need to read directory files one by one and add in the ZipArchive Class object.

CodeIgniter already provided a zip library that allows either add files or a directory for Compress.

Need to load the zip library for using it.

In this tutorial, I show how you can create a zip file, download, and save it to the server with CodeIgniter.

Create and Download Zip file in CodeIgniter

Read more

Export Data in Excel and CSV format with Laravel Excel

Laravel Excel is a package which simplifies the import and export data in Laravel.

It allows exporting data in various format – xlsx, csv, xml, html, pdf, etc.

Require to create a separate class from where return data and set heading row.

In this tutorial, I am using it to export MySQL data in CSV and Excel format in Laravel project.

Export data in Excel and CSV format with Laravel Excel

Read more