Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Generating Scaffold in Admin Section
  • I was trying to create a scaffold inside of an existing admin section.
    The results where not exactly what I thought they would be.

    oil g scaffold admin_teachers salutation:varchar[10] first:varchar[32].......

    Is this not the right syntax?  


  • I think I found the answer myself running just oil g.

    oil g scaffold/template_subfolder <modelname> [<fieldname1>:<type1> |<fieldname2>:<type2> |..]

    So should have been: oil g scaffold/admin teachers salutation:varchar[10] first:varchar[32].....

    Will try in next model.  :)

  • Correction

    The above was incorrect for an admin section.

    It should be:

    oil g admin mymodelname var1:text var2:text -f

    You need to force it because oil will rewrite over the base.php file and the admin controller etc.

    If you have modified those you can use the --overwrite 
  • Why would you want to overwrite the admin controller? Why not use the skip argument?
  • +1 for -s

Howdy, Stranger!

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

In this Discussion