Does Grocery Crud support one to many relation?

Hi @johnny,

I there a support for one to many relationship in Grocery Crud, for example I have a table of customers and another of contacts I have customer_id in contacts to relate to customer id in customers on a customers list view, is this relation supported?

Hello @lev ,

Unfortunately there is not such a feature for Grocery CRUD. Currently I believe for 2025 those features will be more like likely to start developing them since these are long waiting features. More specifically:

  • 1 to 1 relation
  • 1 to many relation

For now the only work-around that I can suggest is to use the master-detail page. So customer id can have multiple contacts. For more you can also check the documentation here: setMasterDetail | Grocery CRUD - A PHP CRUD Generator Library

Regards
Johnny

Got that, thank you for your reply.