public function sendVerificationMail(Borrower $borrower) { $data = ['hashCode' => $borrower->getJoinLog()->getVerificationCode(), 'to' => $borrower->getUser()->getEmail(), 'from' => '*****@*****.**', 'subject' => 'Zidisha Borrower Account Verification']; $this->mailer->send('emails.borrower.verification', $data); }
public function sendVerificationCode(Borrower $borrower) { $hashCode = $this->createVerificationToken(); $joinLog = $borrower->getJoinLog(); $joinLog->setVerificationCode($hashCode); $joinLog->save(); $this->borrowerMailer->sendVerificationMail($borrower, $hashCode); }