src/Mailing/Mailable.php
public function attachments()
    {
        $files = func_get_args();

        foreach ($files as $file) {
            if (is_string($file)) {
                $this->_attachments[] = ['file' => $file];
            } elseif (is_array($file)) {
                foreach ($file as $key => $value) {
                    $this->_attachments[] = ['name' => $key, 'file' => $value];
                }
            }
        }

        return $this;
    }
public function attachments()
    {
        $files = func_get_args();

        foreach ($files as $file) {
            if (is_string($file)) {
                $this->_attachments[] = ['file' => $file];
            } elseif (is_array($file)) {
                foreach ($file as $key => $value) {
                    $this->_attachments[] = ['name' => $key, 'file' => $value];
                }
            }
        }

        return $this;
    }
public function attachments ( ) { $ files = func_get_args ( ) ; foreach ( $ files as $ file ) { if ( is_string ( $ file ) ) { $ this -> _attachments [ ] = [ 'file' => $ file ] ; } elseif ( is_array ( $ file ) ) { foreach ( $ file as $ key => $ value ) { $ this -> _attachments [ ] = [ 'name' => $ key , 'file' => $ value ] ; } } } return $ this ; }
add attachments to the mail.

@return $this
add attachments to the mail .