Answer the question
In order to leave comments, you need to log in
How do I get the controller to work in a subfolder of a view?
There is a pages
module , it contains the AdminController controller and the controller views folder /pages/views/admin/
How can I make the controller work in the subfolder /pages/views/admin/config/ I
ask because I tried everything with zero result ..
Answer the question
In order to leave comments, you need to log in
Why is the controller in the views folder?
In theory, the structure should be like this:
-modules/
--pages/
---controllers/
----AdminController.php
----AnotherController.php
---config/
----Config.php
---views/
----admin/
-----index.php
Config.php file code
<?php
namespace app\modules\pages\config
class Config
{
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question