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

Attributable::relationsToArray() doesn't return entity attributes #165

Open rneal-ck opened 2 years ago

rneal-ck commented 2 years ago

In Attributable::relationsToArray(), the entity attributes for a model are only added to $eavAttributes if they exist in the array returned by parent::relationsToArray() (from HasAttributes), however, HasAttributes::relationsToArray doesn't know about the entity attributes, so the check always fails, causing the entity attributes to not be included when converting to JSON.