TIP 02 / 07

You Don’t Have to Store Files to Use Them as Email Attachments in Laravel.

Simply use attachData to add user uploaded files in Mailables.

Here's a snippet from a Mailable class using it.

code
public function build()
{
     return $this->subject('Inquiry')
          ->to('example@example.com')
          ->markdown('email.inquiry')
          ->attachData(
               $this->file,
               $this->file->getClientOriginalName(),
          );
}