public $psr4 = [ APP_NAMESPACE => APPPATH, // For custom app namespace 'Config' => APPPATH . 'Config', 'Blog' => ROOTPATH . 'example/Blog',];
/Home directory of main project folder /example /Blog /Config /Routes.php /Controllers /Blog.php
namespace Config;// Create a new instance of our RouteCollection class.$routes = Services::routes();$routes->get('blog', 'blog::index', ['namespace' => 'Blog\Controllers']);
namespace Blog\Controllers;class Blog extends \CodeIgniter\Controller { function index() { echo "Code module"; }}
404 - File Not Found Controller or its method is not found: \Blog\Controllers\blog::index