Support the ongoing development of Laravel.io →
posted 11 years ago
Eloquent

Hi all, Is it possible to create an observable sync. I am using model::observe to log changes to models on update and basically create a log of all changes by:

return array_diff_assoc($model->getAttributes(),$model->getOriginal());

This is working really well and I now have an atomic changelog, but I can't figure out how to track sync updates with relationships as there is no 'model' for the pivot table.

Any Ideas?

Thanks in advance.

Last updated 3 years ago.
0

No ORM Guru's out there? :)

Last updated 3 years ago.
0

have you tried to observe the relations of the class too?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ajarti ajarti Joined 12 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.