0

I am trying to follow (loosely I might add) the blog tutorial, "Building a Blog System using Yii".

I call the SQL tables tbl_user tbl_role etc as described in the tutorial but the controller ends up being TblUserController and the view folder is called tblUser tblRole.

In the tutorial only the models take the table prefix, the controller and view does not.

Something is changing and I don't know where. Seems Yii is adding some kind of naming convention or the naming convention present is out of order. It is probably because I am working off the svn trunk.

Does anyone know where this is going, so I can stay within the Yii standards?

4

1 回答 1

2

您可以在使用 Gii 时定义表前缀。在您的情况下,您需要将其设置为tbl_. 然后它应该生成UserController而不是TblUserController.

于 2011-03-17T08:52:52.817 回答