-
app/Repositories/TaggedUserRepository.php
Open in GitHubuse App\Notifications\NewCommentTag; class TaggedUserRepository { // public function messageCommentUsers($type, $users, $sender, $alias, Comment $comment) { // if (\is_iterable($users)) { $users = \is_array($users) ? \collect($users)->unique() : $users->unique(); foreach ($users as $user) { if ($this->validate($user) && $user->acceptsNotification($sender, $user, 'mention', 'show_mention_'.$type.'_comment')) { $user->notify(new NewCommentTag($type, $alias, $comment)); } } return true; } // } // }