Skip to content

Instantly share code, notes, and snippets.

@tangoslee
Last active April 12, 2022 02:58
Show Gist options
  • Save tangoslee/7c1e1198ac83bdcee69717367d63c525 to your computer and use it in GitHub Desktop.
Save tangoslee/7c1e1198ac83bdcee69717367d63c525 to your computer and use it in GitHub Desktop.
Laravel Send Notification to Multiple Emails
$tpAdmins = [
$user1->email => $user1->email,
$user2->email => $user2->email,
];
Notification::assertSentTo(
new AnonymousNotifiable(),
CompanyRegisteredNotification::class,
function ($notification, $channels, $notifiable) use ($tpAdmins) {
return $notifiable->routes['mail'] === $tpAdmins;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment