Makitweb Posts

One by One record deletion from the list is time-consuming and frustrating when need to delete many records.

With the use of the checkboxes on the list, you can allow selecting multiple records. Only required to add a single delete button.

In this tutorial, I show how you can delete multiple records using jQuery AJAX in CodeIgniter.

Delete multiple selected records with jQuery AJAX in CodeIgniter

CodeIgniter DataBase PHP

In CodeIgniter, there is 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 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

CodeIgniter PHP

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 zip library which allows to 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

CodeIgniter PHP

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

DataBase Laravel PHP

AJAX DataBase Laravel PHP

AJAX JQuery

In CSV file you can store data in comma-separated string format.

Sometimes require to import existing CSV file data to MySQL database.

For this, you can either directly read the file or upload and then read the file for insert data.

In this tutorial, I show how you can upload and import CSV file data in your MySQL database with Laravel.

Import CSV Data to MySQL database with Laravel

DataBase Laravel PHP

Select2 is a jQuery plugin which customizes HTML select element and makes it more user-friendly.

It adds search features, allows to add an image with options.

The HTML select element option can easily set selected using jQuery – $(selector).val(option-value);.

But this not directly works with the Select2 dropdown element.

In this tutorial, I show how you can dynamically set an option selected in Select2 with jQuery.

Change selected option in Select2 dropdown with jQuery

JQuery