Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

fire saving event in every case #457

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Translatable/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ public function save(array $options = [])
} else {
// If $this->exists and not dirty, parent::save() skips saving and returns
// false. So we have to save the translations
if ($this->fireModelEvent('saving') === false) {
return false;
}

if ($saved = $this->saveTranslations()) {
$this->fireModelEvent('saved', false);
$this->fireModelEvent('updated', false);
Expand Down