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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community