Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

HDInnovations/UNIT3D-Community-Edition

2239 stars
1 code files
View HDInnovations/UNIT3D-Community-Edition on GitHub

app/Repositories/TaggedUserRepository.php

Open in GitHub
use 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;
}
//
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.