Completed

CodeIgniter 4 Training for KDN

Kementerian Dalam Negeri

Date
18 โ€“ 22 Jul 2022
Organised by
Favourite Trainer Sdn Bhd
Trainer
Azman Zakaria
Attendees
7

Tag : Codeigniter 4

Training Date : 18 -  22 July 2022

Location: Kementerian Dalam Negeri, Putrajaya

Introduction :

CodeIgniter is an Application Development Framework - a toolkit - for people who build websites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.

This course is designed for students with knowledge of the previous Codeigniter version (version 3,2,1). Those who are new to Codeigniter are welcome to join but must expect a challenging journey in order to grasp the whole content of the training.

Tools that will be used in this class are as follows :-

  • Laragon (PHP, Apache, MySQL)
  • Visual Studio Code
  • Windows 10 / 11
  • SQL Yog
  • Terminal / Command Line

Each student should have the following minimum PC / Notebook specification recommendation:

  • Window 10 with 8 GB RAM
  • 45 GB Free Storage

Syllabus

 

Chapter 1: Model-View-Controller

  • What is MVC
  • Primary Class Purpose
  • Other common class Types

Chapter 2: Namespaces

  • The simple version
  • Going deeper

Chapter 3: Dependency Injection

  • What is it 
  • How to do it 
  • How to use it 
  • Why controllers are exempt

Chapter 4: Brochure Site Take 1

  • Routes
  • Displaying our site

Chapter 5: Brochure Site Take 2

  • Controllers
  • Routing to Controllers
  • Displaying our page
  • Page cache
  • Clearing the cache

Chapter 6: Product Catalog

  • What we're building
  • Connecting to database
  • Creating the schema
  • Building your model
  • Setting up the controller
  • Displaying the result
  • Sending some demo data

Chapter 7: A Simple Blog Engine

  • What we're building
  • Database setup
  • View layout
  • The Controller
  • The Routes
  • Viewing a single post
  • Recent posts view cell

Chapter 8: A Simple Blog Engine Part 2

  • Testing your application
  • Getting setup for testing
  • Unit testing
  • Deleting a post

Chapter 9: Cat API Search

  • Your API key
  • The Form
  • Getting the Breeds
  • Searching the API

Chapter 10: Building an API

  • What is REST
  • Revising the migrations
  • Planning the API
  • The ResponseTrait
  • Listing Posts
  • Representing a Resource
  • Retrieve a single post
  • Create a new post
  • Updating existing posts
  • Deleting a post
  • PUT a featured image
  • Throttling API access

Chapter 11: Creating CLI Tools

  • Common CLI script uses
  • What we are creating
  • Creating the data model
  • Creating the command skleton
  • Importing the products
 

 

 

 

 

Training Materials

Buku Codeigniter

Inspinia

Nota Kelas

Trainer Profile

 Nama : Azman bin Zakaria
 Umur : 52 tahun
 Pengalaman Dalam Bidang IT : 21 Tahun
 Syarikat : Favourite Trainer Sdn Bhd
 Kelulusan :

  • Bachelor IT UiTM
  • Diploma Computer Science UiTM
  • HRDF Certified Instructor

Azman merupakan senior programmer yang passionate dalam bidang pengaturcaraan komputer dari awal mulai beliau bekerja pada tahun 2000 sehingga hari ini. Beliau mempunyai pengalaman bekerja yang luas di agensi kerajaan, swasta dan sebagai freelancer.
Antara pengaturcaraan yang selalu digunakan adalah seperti :

  • PHP (sejak tahun 2000)
  • PHP dan Laravel Framework
  • PHP dan Yii Framework
  • Coldfusion
  • Java 
  • Java dan Spring Boot Framework
  • Javascript
  • jQuery
  • Vuejs
  • Angular
  • Flutter

 

Notes

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use PHPUnit\Framework\Constraint\Constraint;

class CreateAuditTrailTable extends Migration {
    // run migrate
    public function up()
    {
        $this->forge->addField('id');
        $this->forge->addField([
            'created_at'=> ['type' => 'datetime'],
            'user_name' => ['type' => 'varchar', 'constraint' => 50],
            'url'       => ['type' => 'varchar', 'constraint' => 100],
            'data'      => ['type' => 'text'],
            'ip'        => ['type' => 'varchar', 'constraint' => 15],
            'prev_page' => ['type' => 'varchar', 'constraint' => 100],
            'agent'     => ['type' => 'varchar', 'constraint' => 100],
            'method'    => ['type' => 'varchar', 'constraint' => 10],
        ]);
        $this->forge->createTable('audit_trail', true);
    }

    // run rollback
    public function down()
    {
        $this->forge->dropTable('audit_trail');
    }
}
CREATE TABLE `audit_trail` (
  `id` int(9) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `user_name` varchar(50) NOT NULL,
  `url` varchar(100) NOT NULL,
  `data` text NOT NULL,
  `ip` varchar(15) NOT NULL,
  `prev_page` varchar(100) NOT NULL,
  `agent` varchar(100) NOT NULL,
  `method` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

SELECT * 
FROM film f, film_actor fa, actor a
WHERE fa.film_id = f.film_id 
AND a.actor_id = fa.actor_id 
AND f.film_id = 1;

 

Borang Penilaian Keberkesanan Latihan

Training evaluation ยท CodeIgniter 4 Training for KDN

Log in with the account you registered for this training to fill in the survey.

Log in to fill in the survey

Attendance

Registration closed
This training ended on 22 Jul 2022, so new attendance can no longer be registered.

Students (7)

# Name
1. MOHD AMIRUDIN BIN A WAHAB
2. M YUSLIZAM BIN MAT JUSOH
3. Sharifah Noor Shatila binti Syed Othman
4. Muhammad Syakir Bin Muhamad Farid
5. Janarthanam A/L Aanandan
6. Nur Azri Bin Zakaria
7. Tun Zazarina binti Zainal Abidin