I've also managed to rule out the following as possible causes: the cache driver, and the use of ardent instead of eloquent as the base class. If I call the afterUpdate() method manually from an overridden save method, then the getDirty() array doesn't seem to be populated properly... Could it be a problem with serialisation into the cache? I'm starting to tear my hair out a bit here, would really appreciate your help!
Ok, I solved the problem. When objects are taken out of the cache, the boot method isn't called, so event listeners don't seem to be initialised. I put in a __wakeup method which calls boot, registers the listeners and suddenly all works fine. Maybe this should be added to eloquent?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community