Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

attach multiple files in laravel mailable

public function build()
{
    $email = $this->view('emails.employment_mailview')->subject('Employment Application');

    // $attachments is an array with file paths of attachments
    foreach($attachments as $filePath){
        $email->attach($filePath);
    }
    return $email;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #attach #multiple #files #laravel #mailable
ADD COMMENT
Topic
Name
4+9 =