I’ll like to discuss the convention for multi-word names of view files and view directories?
Let’s say we have a controller PostCommentController and action actionReadAndReview().
The URL would look like /post-comment/read-and-review/1
Then the view file and directory can be named in one of the following ways:
-
app/views/postComment/readAndReview.php
-
app/views/post-comment/readAndReview.php
-
app/views/postComment/read-and-review.php
-
app/views/post-comment/read-and-review.php
I tend to use the first option however in The Guide suggests to use the "lisp-case" for the directory:
http://www.yiiframework.com/doc-2.0/guide-structure-views.html#organizing-views
The usage of camelCase for the view file names is used in the Yii 2 Advanced Project Template.
What convention do you use in your projects?