kenjis/ci4-app-template

CodeIgniter4 application template

v44.5.0 2024-02-03 07:42 UTC

README

This template changes the default configuration of CI4 more secure.

This repository includes:

Requirements

  • PHP 7.4 or later
    • intl
    • libcurl if you plan to use the HTTP\CURLRequest library
    • json (enabled by default - don't turn it off)
    • mbstring
    • mysqlnd if you plan to use MySQL
    • xml (enabled by default - don't turn it off)

How to Install

Composer

$ composer create-project kenjis/ci4-app-template your-project

Git

$ git clone https://github.com/kenjis/ci4-app-template.git your-project
$ cd your-project/
$ composer install
$ git checkout -b main

How to Update

Update Composer packages:

$ composer update

Update your CodeIgniter4 project files:

$ php spark revision:update

How to Use

Services

  • All Services must be manually added to app/Config/Services.php, even if third-party CI4 packages have their own Services.

CSRF

CSP

Changes from the CI4 Default Configuration

Services

Configs

Filters

Features

Others

Available Commands

composer test              // Run PHPUnit
composer cs-fix            // Fix the coding style
composer cs                // Check the coding style
composer sa                // Run static analysis
composer run-script --list // List all commands

Related Projects for CodeIgniter 4.x

Libraries

Tutorials

Building Development Environment