Skip to content

Commit

Permalink
Add and dispatch events on change
Browse files Browse the repository at this point in the history
LSSSettingGroupChangedEvent::dispatch(SettingGroup $settingGroup);
LSSSettingChangedEvent::dispatch(Setting $setting);
  • Loading branch information
alexvenga committed Sep 10, 2023
1 parent 296601b commit 7935f60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Events/LSSSettingChangedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use VI\LaravelSiteSettings\Models\SettingGroup;
use VI\LaravelSiteSettings\Models\Setting;

class LSSSettingChangedEvent
{
use Dispatchable, SerializesModels;

public function __construct(public SettingGroup $settingGroup)
public function __construct(public Setting $setting)
{
//
}
Expand Down
3 changes: 1 addition & 2 deletions src/Events/LSSSettingGroupChangedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use VI\LaravelSiteSettings\Models\Setting;
use VI\LaravelSiteSettings\Models\SettingGroup;

class LSSSettingGroupChangedEvent
{
use Dispatchable, SerializesModels;

public function __construct(public Setting $setting)
public function __construct(public SettingGroup $settingGroup)
{
//
}
Expand Down

0 comments on commit 7935f60

Please sign in to comment.