Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

The current suggestion is to steer away from the serialized data column, and go for a muti-table system. One table is content_blocks, which has a polymorphic relationship to the model/table of its specific type.

I'd love more conversation!

Last updated 2 years ago.
0

I think you're looking for EAV (Entity Attribute Value) design.

Last updated 2 years ago.
0

adamgoose said:

The current suggestion is to steer away from the serialized data column, and go for a muti-table system. One table is content_blocks, which has a polymorphic relationship to the model/table of its specific type.

I'd love more conversation!

This is how I would approach it.

moon0326 said:

I think you're looking for EAV (Entity Attribute Value) design.

I think this might be overkill in this situation. With my experience with EAV I'd avoid it until you are sure its necessary.

Not saying its a bad suggestion. Just might not be the simplest.

Last updated 2 years ago.
0

Yes, I totally agree. If it can be done in a simpler way, I would not bother to use EAV due to its performance issue.

Last updated 2 years ago.
0

This is what I went with.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

adamgoose adamgoose Joined 10 Dec 2013

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.