質問

What I'm trying to do is to create a model called Entities.
I tried to use the console to create my model "Entities" and got this error:

C:\>li3 create model Entities
model could not be created

I'm expecting an Entities.php file to be created in my models folder.

What am I doing wrong here?

役に立ちましたか?

解決

The error occurs because I called li3 by putting a PATH environmental variable to the console folder where li3 lives. I think li3 freaks out cuz it can't find the models folder.

Anyway, I added the console folder to my favorites list and shift right-click on it to make cmd go to the console folder directly so I don't have to type the long path name out. Incidentally, I also found out that by typing

li3 create "insert model name here"

the CLI will create the model, controller, and tests automagically. Too bad it doesn't do the view too.

他のヒント

The reason why the Lithium command doesn't create the views for you is mostly because everyone needs their views differently. With the Form helper at hand, it should not be a problem to get up and running quickly - and the Lithium error messages tell you where to start!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top