Generate Model

apex opus model <FILENAME> --dbtable= <TABLE> [--magic] [--doctrine] [--eloquent]
Generate a new model class.


Parameter Description
filename File location of the new model class, relative to the /src/ directory.


Flag Description
--dbtable The name of the database table to use to generate property names. Not required if generating Eloquent model.
--magic If present, will generate model without hard coded get / set methods and instead allow properties to be accessed directly. . Otherwise, will generate model with hard coded get / set methods.
--doctrine If present, will generate a Doctrine entity class for given database table.
--eloquent If present, will generate an Eloquent model class.


  • ./apex opus MyShop/Models/Products --dbtable shop_products --magic
  • ./apex opus model MyShop/Models/ShopOrder --eloquent