rinvex / laravel-attributes

⚠️ [ABANDONED] Rinvex Attributable is a robust, intelligent, and integrated Entity-Attribute-Value model (EAV) implementation for Laravel Eloquent, with powerful underlying for managing entity attributes implicitly as relations with ease. It utilizes the power of Laravel Eloquent, with smooth and seamless integration.
MIT License
433 stars 104 forks source link

[Question] Do I have to define my attributes up front? #96

Closed grantholle closed 3 years ago

grantholle commented 5 years ago

I'm looking for a solution to add any number of attributes to a model, which are completely dynamic.

My users will create dynamic forms with any number of fields/types. When they save I would like to save those attributes on the model dynamically. I won't know what kind of fields they will create.

The way I can see it working is to dynamically create the fields that don't exist when a form is submitted and data needs to be saved.

Is my understanding correct? Are there other solutions that exist for the problem I'm describing?

Omranic commented 3 years ago

As far as I understand your use case, you are correct, and this package could be used in that way you described.

Though, I'm not sure about the performance, so you need to understand your use case carefully, and do some tests first.