Answer the question
In order to leave comments, you need to log in
How to fix 404 error if I store views in separate folders in Yii2?
Good morning!
Since yesterday, I have been facing a solution to a 404 error, which is described as follows:
The problem is that when I store views in separate folders and correctly describe access parameters in controller actions, Yii2 considered this a big mistake.
And not only in one controller, but in front of you is the structure of the views folder of my Yii2 project (the site folder is where the views are stored:
├── layouts
│ ├── main.php
│ └── service.php
└── site
├── index .php
├── news
│ ├── index.php
│ └── view.php
├── objects
│ ├── index.php
│ ├── object.php
│ └── view.php
└── passport
├── cart.php
├── offers.php
├── page.php
├── profile.php
└── services.php
The code example of one of the controllers where I encountered this problem will be in the comments to this question and how to properly distribute views?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question