Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil Generate Admin error - [...] already exists
  • When using the following command: basicdesigns:blog me$ oil generate admin posts title:string slug:string summary:text body:text user_id:int I get the following error: Error: /Applications/MAMP/htdocs/blog/fuel/app/classes/model/post.php already exists, use -f or --force to override. I have already created a model called posts for the posts (obviously) using oil generate blah blah. This is following Phil's tutorial and I'm, again, a little lost as to why this is happening and would really appreciate it if somebody could explain what I am doing wrong. Thanks again!
  • You're not doing anything wrong, models go in classes/model, and names must be unique (obviously). So if your admin posts model is the same are the model you generated for the crud controller (which it should be) you can add the -f switch and overwrite it. oil can not know that they are the same, so it won't overwrite unless told to do so.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion