This commit is contained in:
Richard Dern
2022-01-12 00:35:37 +01:00
commit 400e3d01f1
1363 changed files with 57778 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Models\Observers;
use App\Models\Bookmark;
use App\Notifications\UnreadItemsChanged;
use Illuminate\Support\Facades\Notification;
class BookmarkObserver
{
/**
* Handle the bookmark "created" event.
*/
public function created(Bookmark $bookmark)
{
Notification::send($bookmark->folder->group->activeUsers, new UnreadItemsChanged(['documents' => [$bookmark->document->id]]));
}
/**
* Handle the bookmark "deleting" event.
*/
public function deleting(Bookmark $bookmark)
{
}
}