jarektkaczyk / eloquence-base

base for the Eloquence extensions + Searchable
https://softonsofa.com
MIT License
77 stars 69 forks source link

Observe only if instance of CleansAttributes #34

Open sergejostir opened 3 years ago

sergejostir commented 3 years ago

Instead of registering observer in every case and then checking if CleansAttributes is implemented on every event, we should register observer only if the model actually implements CleansAttributes.

This way those of us that are not interested in automatic attribute cleaning can simply not implement it without any overhead.