Laravel: Pass an array from controller, to mail::to

Viewed 2878

In my project after someone fill a pricequote I want to send an email for him/her. In the controller I made an array what I want to pass to the mailable, to show on the email.

Where I'm now:

$params = array(
        'name' => $name, //user's data
        'email' => $email,
        'phone' => $phone,
        'data' => $data, //other stuffs in the form 
);

Mail::to($email)
    ->send(new pricequote($params));

And after that how to pass from the mailable class to the template?

2 Answers
Related