Thanks to Codeigniter 4 Team who made all of this possible. User Guide here is your primary resource.
- rename admin/Config/App-dist.php to App.php.
- rename catalog/Config/App-dist.php to App.php.
- rename env to .env
- run the installation wizard
- remove the install directory once done
- the system could be extended to create CMS or even a shopping cart
- PHP version 7.2 or newer with the intl extension and mbstring extension installed.
- MySQL (5.1+) via the MySQLi driver
- PostgreSQL via the Postgre driver
- SQLite3 via the SQLite3 driver
- libcurl for CURLRequest
- intl extension to be loaded
- Extensions Development for both Admin/Catalog: Extensions are helper files that extend the core funcionality of the system. They could be designed for Admin or Catalog.
- start from the Admin\Controllers\Extension.
- create your first extension controller file which will act as a masetr controller for the new extension.
- you may follow the same hirarchy for the already installed extension for EX: wallet.php.
- put lang/view files and view file in their respective location.
- if you want to alter DB with new Tables use forge class, check Admin\Models\Extension/BidModel.php.
$forge = \Config\Database::forge(); $fields = [ 'bid_id' => [ 'type' => 'INT', 'constraint' => '11', ], $forge->addField($fields); $forge->addPrimaryKey('bid_id'); $forge->createTable('bids', true);
- after finishing the primary extension files, head over to Admin\Extensions and create child extensions to serve the extension purpose, you will find examples there for a good start.
- once children created with the same flow head over to the Admin Panel menu and install the extension.
- to call the extension in Catalog, create your MVC files in Catalog\Controllers\Extensions.
$extensionModel = new \Catalog\Models\Setting\ExtensionModel(); $blog = $extensionModel->getExtensions('blog');
- Important Note, you might encounter issues with lang vars,
- since no lang data vars are needed in controller.
- therfore you have to alter the Config/Routes.php following the same rules for
- correct routing.
- Modules Development for both Catalog: Modules Are created to extend the Theme layout like adding information boxes to Layout parts After creating a module it must be assigned to template layout from the design menu otherwise they won't be visible to the frontend
- Modules, unlike Extensions, require less work.
- start from the Admin\Controllers\Modules.
- create your first controller, a good start will be checking Account.php.
- put lang/view files and view files in their respective location.
- install your module from Extensions Module
- Assign the Module to Layout from Design->layout and the Module will be called automatically from their respective layout
© 2021 A0twa