-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are we free to put models in any folder location? #107
Comments
My personal approach: keep controller, models and views close together. General Models in a separate folder Models. I would like to know a recommended or standardized way as requested though. |
I imagine we can put them anywhere. But I agree some structure and keeping them together is best. Do you seperate your business logic into folders like “Blog” and then have controllers, models and views under this directory or in subdirectories ? |
Since I have URLs like https://www.domain.tld/category/page I placed files like this:
I'm sure it's not perfect, but works alright for me. I can always find the files fast I need to edit. |
@Mister-42 approach is alright. That should be added to yiisoft/docs. |
See yiisoft/app#238 |
I realise documentation is not complete and yii3 is still in development. I am just trying to plan a migration from yii2 to yii3 and the only thing I cannot seem to work from this project is where I stick my "models"
Apologies if this is a stupid question. Very much have my Yii2 hat on.
Is there a recommended directory structure?
The text was updated successfully, but these errors were encountered: