title: Laravel 8: how to send email with attachment using markdown
body: <p>I would like to know how to include an attachment when sending an email using laravel and markdown.
  This is the class <strong>InvoiceEmail extends Mailable</strong></p>
  <pre><code>  protected $data;
      public function __construct($data)
      {
          $this-&gt;data = $data;
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
          return $this-&gt;from('tes@test.com')-&gt;subject('Order')-&gt;markdown('emails.invoiceEmail')-&gt;with('data',$this-&gt;data);
      }
  </code></pre>
  <p>In the controller called OrderController I send the email:</p>
  <pre><code>   $customerPDF = 'file.pdf';
  
     $data = array(
          'name' =&gt; $request-&gt;vendor_name,
          'company' =&gt; $request-&gt;company,
          'vat'=&gt; $request-&gt;vat,
          'category' =&gt; $request-&gt;category,
          'url' =&gt; Route('vendor.reg.enable.account',$enableCode)
      );
  
  
      Mail::to($request-&gt;email)-&gt;send(new InvoiceEmail($data));
  </code></pre>
  <p>My question is: how can I attach the customerPDF?</p>