Add Google reCAPTCHA v2 to form in CodeIgniter 4

Google reCaptcha helps to protect the website against spam and bot submissions. It is mainly applied to login, registration, contact us, and add comment forms.

There are 2 versions of Google reCaptcha –

  1. v2 – User needs to select images based on the question.
  2. v3 – This is an invisible type of captcha.

In this tutorial, I show how you can add google recpatcha v2 to your form with validation in the CodeIgniter 4 project.

Add Google reCAPTCHA v2 to form in CodeIgniter 4

Read more

Reorder images and save to MySQL database – CodeIgniter 4

Using jQuery UI sortable you can enable HTML element dragging on your page.

Initialize it on the element that you want to allow the users to reorder.

In this tutorial, I show how you can reorder images using jQuery UI and save them to the MySQL database in CodeIgniter 4.

Reorder images and save to MySQL database - CodeIgniter 4

Read more

How to add Foreign key in migration – CodeIgniter 4

In a database, a foreign key is a field that references another table.

They keep track of related records and which table they exist in. They also let you know what record they relate to, which means updating them is simple and quick.

In this tutorial, I show how you can add a foreign key while creating table using migration in CodeIgniter 4.

How to add Foreign key in migration - CodeIgniter 4

Read more

What is Database Seeding in CodeIgniter 4?

Database seeding is a way of populating a database with test data that can be used for initial testing to explore the various functions of your application instead of having to create test users one by one every time you want to test something new.

In CodeIgniter 4 database seeding feature is available.

This post guides you through the creation of database seeding and running single or multiple seeding files in CodeIgniter 4.

What is Database seeding in CodeIgniter 4?

Read more