Problem in routing |
Hello.
Created a folder "Modules" with modules in the root ... In file autoload.php PHP Code: $psr4 = [ structure in the module folder: Content - Config - Controllers - Models - Libraries ... ... create controller: ContentAdminController PHP Code: namespace Modules\Content\Controllers; add route: PHP Code: $routes->add('admin', 'ContentAdminController::index', ['namespace' => 'Modules\Content\Controllers']); http://name_site.ru/admin add route: PHP Code: $routes->add('admin/(:any)', '$1::index', ['namespace' => 'Modules\Content\Controllers']); http://name_site.ru/admin/ContentAdminController Help, why the class does not work dynamically? thanks |
Messages In This Thread |
Problem in routing - by Dedov_Evgeniy - 12-16-2019, 05:59 PM
RE: Problem in routing - by Dedov_Evgeniy - 12-23-2019, 10:12 AM
RE: Problem in routing - by Digital_Wolf - 12-23-2019, 02:44 PM
RE: Problem in routing - by Dedov_Evgeniy - 12-23-2019, 04:56 PM
RE: Problem in routing - by Digital_Wolf - 12-24-2019, 03:55 AM
RE: Problem in routing - by InsiteFX - 12-24-2019, 04:04 AM
|