Closed eblanshey closed 10 years ago
This is a known issue, and is fixed in the upcoming 3.0 release.
Ah, I wasn't aware. Any rough timeframe available?
You can use the callback functionality in 2.1 if you need access to the previously set attributes if you really need them btw. Otherwise you could try out 3.0 using the version constraint 3.0.*@dev
.
You have the following example in the docs:
It's assuming that, in the closure, $object->title will refer to the title which was just previously generated, but that is not the case, as the attributes have not been set on the model at this point.
In the
attributesFor()
method, you are assigning the attributes to an array, not the object itself.