Relationships
Micron generates relationship methods for related models based on their foreign keys.
During model creation, Micron parses through all the foreign keys and it generates one to many and one to one methods for each model. It uses singular and plurals for the method names depending on the localization reconfigured for micron.
Example, A customers table has a customer item which has many orders. Micron will generate two methods for customer model object.
For this example.. an order has one customer, Micron will generate method bellow:
Last updated