userMailer = $userMailer; } /** * Handle the event. * * @param InvoiceSent $event * @return void */ public function handle(InvoiceSent $event) { $invoice = $event->invoice; foreach ($invoice->account->users as $user) { if ($user->{'notify_sent'}) { $this->userMailer->sendNotification($user, $invoice, 'sent', $payment); } } } }