attach multiple files in laravel mailable

Solutions on MaxInterview for attach multiple files in laravel mailable by the best coders in the world

showing results for - "attach multiple files in laravel mailable"
Manuela
26 Feb 2020
1public function build()
2{
3    $email = $this->view('emails.employment_mailview')->subject('Employment Application');
4
5    // $attachments is an array with file paths of attachments
6    foreach($attachments as $filePath){
7        $email->attach($filePath);
8    }
9    return $email;
10}
11