Skip to content

Commit

Permalink
Fix compatibility with older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
riasvdv committed Jul 11, 2024
1 parent ada754d commit 1d5f0ed
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions tests/TestClasses/TestMailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@
namespace Spatie\LaravelRay\Tests\TestClasses;

use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Attachment;

class TestMailable extends Mailable
{
public function build()
{
return $this->markdown('mails.test');
}

/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [
Attachment::fromData(fn () => 'file1')->as('file_1.txt')->withMime('text/plain'),
Attachment::fromData(fn () => 'file2')->as('file_2.txt')->withMime('text/plain'),
];
return $this->markdown('mails.test')
->attachData('file1', 'file_1.txt')
->attachData('file2', 'file_2.txt');
}
}

0 comments on commit 1d5f0ed

Please sign in to comment.