mercredi 1 novembre 2017

Sending value from controller to Mail to view

In my controller, I am trying send mail like this

$activationLink = $activation->GetActivationCode->ActivationLink;
\Mail::to($company)->send(new MLink);

I have a variable called activationlink, which I need to send it to the email

Mlink Mail class

public function build()
    {
        return $this->view('emails.mindbody')->with($activationLink);
    }

View file

<h2>Your activation link is :  </h2>

It's not working this way, I get the activationlink is not defined error.

How can I pass the $activationLink from my controller, to the view file (the email that is sent)?



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

Aucun commentaire:

Enregistrer un commentaire