diff --git a/src/Globals/Variables.php b/src/Globals/Variables.php index 9b4cb1b7..38e45273 100644 --- a/src/Globals/Variables.php +++ b/src/Globals/Variables.php @@ -49,13 +49,6 @@ protected function getOriginByString($origin) return $this->globalSet()->in($origin); } - public function save() - { - $this->toModel()->save(); - - return $this; - } - public function model($model = null) { if (func_num_args() === 0) { diff --git a/tests/Globals/GlobalsetTest.php b/tests/Globals/GlobalsetTest.php new file mode 100644 index 00000000..a7c9c853 --- /dev/null +++ b/tests/Globals/GlobalsetTest.php @@ -0,0 +1,30 @@ +addLocalization( + $global->makeLocalization('en')->data(['foo' => 'bar', 'baz' => 'qux']) + ); + + $global->save(); + + Event::assertDispatched(GlobalSetSaved::class); + Event::assertDispatched(GlobalVariablesSaved::class); + } +}