jpkleemans/attribute-events

JSON-columns

jeffreyvanhees opened this issue · 2 comments

Hi! Great package and well documented, thanks a lot!

Question: Do you have an idea how to dispatch an event when a value in a json-column changes? Like:

protected $dispatchesEvents = [
  'settings->color:*' => ColourChanged::class,
]

The example above doesn't seems to work.

Jeffrey

Hi Jeffrey, great suggestion! I've added support for it in version 1.1.0.

You can find the documentation here: https://github.com/jpkleemans/attribute-events#json-attributes

Your're great! Thanks a lot!