Support the ongoing development of Laravel.io →
Database Eloquent Architecture
Last updated 1 year ago.
0

If the fields can be whatever you might want to examine the EAV database model. It is used when 'administrators', which do not have any technical knowledge, define models on the fly. For example in web shops, they can add new products (shoe1234) to the database, which have a distinct set of attributes (color, size etc). The user fills a form to place the order, the form fields shows the associated attributes. When the form s submitted you register what values are associated with the placed order (blue for color, 35 for size).

EAV should be a pain with Eloquent, maybe alternative ORM's are available.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.