diff --git a/app/Observers/StatusHashtagObserver.php b/app/Observers/StatusHashtagObserver.php new file mode 100644 index 000000000..51832bcb8 --- /dev/null +++ b/app/Observers/StatusHashtagObserver.php @@ -0,0 +1,64 @@ +hashtag_id, $hashtag->status_id); + } + + /** + * Handle the notification "updated" event. + * + * @param \App\Notification $notification + * @return void + */ + public function updated(StatusHashtag $hashtag) + { + StatusHashtagService::set($hashtag->hashtag_id, $hashtag->status_id); + } + + /** + * Handle the notification "deleted" event. + * + * @param \App\Notification $notification + * @return void + */ + public function deleted(StatusHashtag $hashtag) + { + StatusHashtagService::del($hashtag->hashtag_id, $hashtag->status_id); + } + + /** + * Handle the notification "restored" event. + * + * @param \App\Notification $notification + * @return void + */ + public function restored(StatusHashtag $hashtag) + { + StatusHashtagService::set($hashtag->hashtag_id, $hashtag->status_id); + } + + /** + * Handle the notification "force deleted" event. + * + * @param \App\Notification $notification + * @return void + */ + public function forceDeleted(StatusHashtag $hashtag) + { + StatusHashtagService::del($hashtag->hashtag_id, $hashtag->status_id); + } +}