We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RevisionSaving
1 parent 345b6e7 commit f3c2ee1Copy full SHA for f3c2ee1
src/Revisions/Revision.php
@@ -5,6 +5,7 @@
5
use Illuminate\Database\Eloquent\Model;
6
use Statamic\Events\RevisionDeleted;
7
use Statamic\Events\RevisionSaved;
8
+use Statamic\Events\RevisionSaving;
9
use Statamic\Revisions\Revision as FileEntry;
10
use Statamic\Revisions\WorkingCopy;
11
@@ -78,6 +79,10 @@ public function model($model = null)
78
79
80
public function save()
81
{
82
+ if (RevisionSaving::dispatch($this) === false) {
83
+ return false;
84
+ }
85
+
86
$this->model->save();
87
88
RevisionSaved::dispatch($this);
0 commit comments