Download the PHP package okfsoft/ci4-hmvc without Composer
On this page you can find all versions of the php package okfsoft/ci4-hmvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download okfsoft/ci4-hmvc
More information about okfsoft/ci4-hmvc
Files in okfsoft/ci4-hmvc
Package ci4-hmvc
Short Description CodeIgniter v4 HMVC
License MIT
Homepage https://github.com/okfsoft
Informations about the package ci4-hmvc
CODEIGNITER 4 HMVC STARTER
≡ About ci4-hmvc
This is a project archive that we use to make it easier for us to build web applications based on the CodeIgniter4 framework. Hopefully it can be useful.
CodeIgniter is a php based framework and works on the MVC (Model-View-Controller) pattern. Can also use Hierarchical Model View Controller (HMVC). HMVC stands for Hierarchical Model View Controller. This is the latest version of the HMVC pattern used for web applications. Provide solutions to help you address application scalability such as easy module updates.
≡ Table of contents
- Requirements
- Feature List
- Installation Preparation
- Install via composer
- Setup HMVC
- Config File
- How to use
- Use of HMVC
- Router Settings
- Helpers
- Credit
≡ Requirements
≡ Feature list
This is a list of some features or functionality that you can use.
- [x] HMVC Architecture
- [x] BaldeOne Templating Engine
≡ Preparation & Installation
To get ready to install packages, you have to install codeigniter 4 appstarter with composer, or you can follow the user guide to install using composer.
Now the next step is to add the rule in composer.json in your project root, and add the following rule to make it work after the installation is complete, or you can skip this preparation and add it manually in step number 03.
01. Install library via composer:
02. Distribute HMVC
Now you can distribute the library can be done via spark:
This will copy and distribute the sample hmvc structure folder in your project root parallel to the codeigniter4 app
folder.
03. Modify Autoload.php
( Ignore rule number 03 if you have added autoload in composer.json ).\
Next you need to modify psr-4 settings on Autoload.php file on app/Config/Autoload.php
and add below rules
≡ Use of HMVC
You can try running php spark serve
to run codeigniter development and visiting http://localhost:8080/starter
it will load hmvc modules/application/Starter
which will show if there are no problems during installation.
When you http://localhost:8080/starter/blade
will load hmvc starter using BladeOne Template Engine
01. Router Settings
You can make Routes.php
settings for each new module created in the modules/application/{Module_name}/Config.php
directory, using this code sample:
You can use BladeOne Rendering which comes in the package. or use with the help of Class Helper
≡ Helpers
Parameter | Information |
---|---|
return renderView('home', $data); |
HMVC Display Rendering using Default |
return renderBlade('home', $data); |
HMVC Display Rendering using BladeOne |