CodeIgniter 4 Rest Api Example Tutorial

CodeIgniter 4 is the latest version of the popular PHP framework CodeIgniter. It is a powerful tool for creating web applications and APIs. In this tutorial, we will create a simple REST API using CodeIgniter 4. We will create a simple API that will allow users to register, login, and retrieve user information. We will … Read more

Codeigniter 4 call model function from controller

In Codeigniter 4, you can call a model function from a controller using the following syntax: $this->modelName->functionName(); For example, if you have a model named User_model and a function named get_user_details(), you can call it from a controller like this: $this->User_model->get_user_details(); [ad_1] Call model function/method from controller in CodeIgniter 4; In this tutorial, you will … Read more

Codeigniter 4 Morris Bar & Stacked Chart Examples

1. Morris Bar Chart This example demonstrates how to create a Morris Bar Chart using Codeigniter 4. The chart will display the total number of orders placed by customers in the last month. Step 1: Create a controller Create a controller named MorrisBarChart.php in the app/Controllers folder.

Generate PDF from HTML View using DomPDF in CodeIgniter 4

Step 1: Download DomPDF Library Download the dompdf library from the official website. Step 2: Extract the Library Extract the downloaded library and copy the “dompdf” folder and paste it into the “app/ThirdParty” directory. Step 3: Create a Controller Create a controller file “Pdf.php” in the “app/Controllers” directory and add the following code in it.

Codeigniter 4 Google Map Multiple Markers Example

In this tutorial, we will show you how to integrate Google Map with multiple markers in Codeigniter 4 application. Step 1 – Create Database Table First, we need to create a database table to store the marker information. So, create a table named “markers” in the database. CREATE TABLE `markers` ( `id` int(11) NOT NULL … Read more

Server Side DataTable in CodeIgniter 4

CodeIgniter 4 provides a library for server-side processing of data tables. The library is called DataTables and it is available in the CodeIgniter 4 application/libraries folder. To use the library, you need to include the library in your controller. // Load the DataTables library $this->load->library(‘datatables’); Once the library is loaded, you can use the library … Read more