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
434 stars 104 forks source link

FIX: Make values always be a collection when force deleting. Fixes #90. #103

Closed javoscript closed 3 years ago

javoscript commented 4 years ago

Just wrap the $values variable in a collection. If it was a single value, now it is a collection and the isEmpty() method will not throw an Exception. If it was already a collection, nothing changes.

jakubmikita commented 3 years ago

Can this be merged please?

jakubmikita commented 3 years ago

Unfortunately, this patch only suppresses the error, but no relations are removed from the database. The problem is with $entity->relationLoaded()