mardi 26 décembre 2017

Can I send 2 message (2 fields from a form) in one email using SendMail's build function of Laravel?

My email sending is working well. No problem with this.

public function build(request $request)
{
    return $this->view('admin.appointment.email',['msg'=>$request->message])->to($request->to);
}

but I want to send two fields. for instance a date and a message in one single email. So i tried to use:

public function build(request $request)
{
    return $this->view('admin.appointment.email',['msg'=>$request->message],['msg2'=>$request->message2])->to($request->to);
}

But this gives me error as Undefined variable: msg2. which is

at CompilerEngine->handleViewException(object(ErrorException), 1) in PhpEngine.php (line 44)

hence can I add new parameter for msg2?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2C718KJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire