开发者

Yii model tbl_* creates TblUserController and tblUser View

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 p开发者_JAVA百科refix, 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?


You can define table prefix when using Gii. In your case you need to set it to tbl_. Then it should generate UserController instead of TblUserController.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜