Model
You can create one of three types of model classes (Apex, Doctrine, Eloquent) customized to any table within the database by using the opus model CLI command, such as:
apex opus model <FILENAME> --dbtable <TABLE_NAME> [--magic] [--doctrine|--eloquent]
apex opus model MyShop/Models/Order --dbtable shop_orders --magic
Using the above example, a new file will be created at /src/MyShop/Models/Customer.php
, plus one file for any foreign key relations the table has. For full information on how to both, generate and fully utilize models, please visit one of the below links:
- [AApex Models section of the documentation.
- Doctrine Models
- Eloquent Models