Closed jonsa closed 9 years ago
I suggest changing Factory::triggerCallback to
Factory::triggerCallback
private function triggerCallback($object, $model) { if ($callback = Arr::get($this->callbacks, $model)) { $saved = $this->isPendingOrSaved($object); return $callback($object, $saved) !== false; } return false; }
This would allow the second persist to be optional. This was briefly mentioned in #282 but wasn't implemented.
Could you send a pull with tests please?
I suggest changing
Factory::triggerCallback
toThis would allow the second persist to be optional. This was briefly mentioned in #282 but wasn't implemented.