Step-by-Step Guide: CodeIgniter 4 Adding Foreign Key in Migration

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.

Step-by-Step Guide: CodeIgniter 4 Adding Foreign Key in Migration

Read more

Getting Started with CodeIgniter 4 Database Seeding: A Beginner Guide

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.

Getting Started with CodeIgniter 4 Database Seeding: A Beginner Guide

Read more

How to create Helper function and use it in Laravel

A Helper function is a small piece of code that performs a specific task or operation and can be used anywhere in your application.

In Laravel you need to create a new PHP file to write Helper functions and specify the file path in the composer.json file.

In this article, you will learn how to create Helper functions in Laravel and how to use it.

How to Create and Use Helper function in CodeIgniter 4

Read more