How can I send email templates that are stored in a database using Laravel-5?
I am currently using the following code:
Mail::queue('emails.orderthankyou', $order->get()->first()->toArray(), function ($message) {
$message->to('me@myemail.com')->subject('Thank you for your order');
});
However, this template is currently being pulled from the catalog Resources/views. I need to change this since my email templates are now stored in a database, for example:
Dear {{ $first_name }},<br><br>
Thank you for your order.
How can I pull these templates out of the database and make them sent using Mail :: Queue?
Thanks in advance.
source
share