title: Laravel-5 how to send email from templates stored in db
body: <p>How can I send email templates which are stored in a database using Laravel-5?</p>
  
  <p>I am using the following code currently:</p>
  
  <pre><code>/* Queue thank you email for sending */
  
  Mail::queue('emails.orderthankyou', $order-&gt;get()-&gt;first()-&gt;toArray(), function ($message) {
      $message-&gt;to('me@myemail.com')-&gt;subject('Thank you for your order');
  });
  </code></pre>
  
  <p>However, currently the above template is pulled from the <code>Resources/views</code> directory.  I need to change this as my email templates are now stored in a database, like so:</p>
  
  <pre><code>Dear {{ $first_name }},&lt;br&gt;&lt;br&gt;
  
  Thank you for your order.
  </code></pre>
  
  <p>How can I pull these templates from the database and render them to be sent using Mail::Queue?</p>
  
  <p>Thanks in advance.</p>