JoaoHamerski
2 weeks ago

Best way to implement dynamic table attributes in Laravel?

Posted 2 weeks ago by JoaoHamerski

I would like to know, for example, if i have a products table and i don't know what will be the attributes, maybe it can be a smartphone (with attributes: display, cpu, gpu ...) or a hdd ( with attributes: memory size, rpm ...), so, what is the best way to implement it? I know that i can save it in a field a descpription with a WYSIWYG editor and put anything i want, but i want to use these attributes to make a search by query string, so, how can i do it? Maybe saving as json in a filed on the table products? In json i can do a search by query string? How would be it?

Please sign in or create an account to participate in this conversation.