Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How do I generate a model for existing tables?
  • I am porting an app over to fuel, but since the tables already exist, is there a method to generate models based on existing tables?
  • There is a task called 'fromdb' which allows model generation from existing db tables.

    php oil g fromdb -h
  • Thanks Harro,

    Can you specify a table or does it do the whole db?

    Is fromdb in the docs, I cannot find it.
  • Just tried it, I do not see the syntax for it in the help
  • I found it on google.

    php oil r fromdb:scaffold products

Howdy, Stranger!

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

In this Discussion