From: Louis Jeckel Date: Wed, 6 Jan 2021 11:54:41 +0000 (+0100) Subject: unsub error X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=49e94e88610b95ab110e4453af48d2db885552ed;p=psq.git unsub error --- diff --git a/app/Events/DispatchMailgunEvent.php b/app/Events/DispatchMailgunEvent.php index 5528667..76dc220 100644 --- a/app/Events/DispatchMailgunEvent.php +++ b/app/Events/DispatchMailgunEvent.php @@ -74,7 +74,7 @@ class DispatchMailgunEvent implements ShouldBroadcast $this->data = $event; if($event->event === 'unsubscribed') { - $event->user->unsubscribe(); + $event->recipient->unsubscribe(); } diff --git a/app/MailgunEvent.php b/app/MailgunEvent.php index 8155bad..724cab5 100644 --- a/app/MailgunEvent.php +++ b/app/MailgunEvent.php @@ -12,7 +12,7 @@ use Illuminate\Support\Arr; * @package App * @property EmailBatch $batch * @property string $event - * @property User $user + * @property User $recipient */ class MailgunEvent extends Model