Fix broken notification emailer

This commit is contained in:
Toby Zerner 2015-05-19 10:53:17 +09:30
parent 48a8beea52
commit 1adfe5d867

View File

@ -16,10 +16,14 @@ class NotificationEmailer implements NotificationSender
public function send(Notification $notification, User $user)
{
$this->mailer->send($notification->getEmailView(), ['notification' => $notification], function ($message) use ($notification, $recipient) {
$message->to($recipient->email, $recipient->username)
->subject('['.$this->forum->title.'] '.$notification->getEmailSubject());
});
$this->mailer->send(
$notification->getEmailView(),
compact('notification', 'user'),
function ($message) use ($notification, $user) {
$message->to($user->email, $user->username)
->subject('['.$this->forum->title.'] '.$notification->getEmailSubject());
}
);
}
public static function compatibleWith($class)