11-01-2018, 10:34 PM
(This post was last modified: 11-02-2018, 01:38 AM by Dedov_Evgeniy.)
Hello, help me please.
How can you configure routes for such a structure.
Application
Modules
--Shop
----Controllers
------Admin
--------ControllerAdmin_1.php
--------ControllerAdmin_2.php
------ControllerPublic_1.php
------ControllerPublic_2.php
----Models
----Views
----...
----...
--Blog
--Forum
...
...
Need to...
http://site.com/admin/blog/....
to
Modules/Blog/Controllers/Admin/ControllersAdmin.php
And
http://site.com/blog/....
to
Modules/Blog/Controllers/ControllersPublic.php
So you can't?
Thank.
How can you configure routes for such a structure.
Application
Modules
--Shop
----Controllers
------Admin
--------ControllerAdmin_1.php
--------ControllerAdmin_2.php
------ControllerPublic_1.php
------ControllerPublic_2.php
----Models
----Views
----...
----...
--Blog
--Forum
...
...
Need to...
http://site.com/admin/blog/....
to
Modules/Blog/Controllers/Admin/ControllersAdmin.php
And
http://site.com/blog/....
to
Modules/Blog/Controllers/ControllersPublic.php
So you can't?
PHP Code:
$routes->get('admin/([0-9a-z_-]+)', 'Modules\$1\Controllers\Admin\Index::index');
Thank.