Refresh
This commit is contained in:
25
app/Models/Observers/BookmarkObserver.php
Executable file
25
app/Models/Observers/BookmarkObserver.php
Executable 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user