PHP code example of simpletine / codeigniter4-hmvc-shield

1. Go to this page and download the library: Download simpletine/codeigniter4-hmvc-shield library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simpletine / codeigniter4-hmvc-shield example snippets


$routes->get('new', 'Blogs::new');

$routes->group(
    'blogs', ['namespace' => '\Modules\Blogs\Controllers'], function ($routes) {
        $routes->get('/', 'Blogs::index');
        $routes->get('new', 'Blogs::new');
    }
);

public $psr4 = [
    "Blogs" => APPPATH . "Modules/Blogs", // Example 
    // ...
];
bash
php spark serve
bash
php spark simpletine:setup
bash
php spark shield:user create
bash
composer update
cp vendor/codeigniter4/framework/public/index.php public/index.php
cp vendor/codeigniter4/framework/spark spark
bash
php spark module:create Blogs 
bash
php spark module:copy Blogs Items 
bash
php spark module:controller Blogs Categories 
bash
php spark module:model Blogs Categories 
bash
php spark publish:assets 
bash
php spark publish:views 
bash
php spark module:controller Admin Users --admin