App\Listeners\NotificationListener::sendEmails PHP Метод

sendEmails() приватный Метод

private sendEmails ( $invoice, $type, null $payment = null )
$invoice
$type
$payment null
    private function sendEmails($invoice, $type, $payment = null)
    {
        foreach ($invoice->account->users as $user) {
            if ($user->{"notify_{$type}"}) {
                $this->userMailer->sendNotification($user, $invoice, $type, $payment);
            }
        }
    }