RoboTamer
RoboTamer

Reputation: 3514

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 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?

Upvotes: 0

Views: 579

Answers (1)

Sam Dark
Sam Dark

Reputation: 5291

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.

Upvotes: 2

Related Questions