Skip to content

Commit b3bfb5d

Browse files
Merge pull request #63 from stackkit/bugfix/tests
Fix tests
2 parents ab25d62 + 98e2498 commit b3bfb5d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
services:
2+
app:
3+
image: serversideup/php:8.3-fpm
4+
volumes:
5+
- .:/var/www/html
26
mysql:
37
image: mysql:8
48
ports:

src/MailableReader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Mail\Mailable;
1010
use Illuminate\Mail\Mailables\Content;
1111
use Illuminate\Mail\Mailables\Envelope;
12+
use Illuminate\Support\Arr;
1213
use Illuminate\Support\Traits\Localizable;
1314

1415
class MailableReader
@@ -158,7 +159,9 @@ private function readBody(EmailComposer $composer): void
158159
$mailable = $composer->mailable;
159160

160161
$composer->email->view = $mailable->view;
161-
$composer->email->variables = $mailable->buildViewData();
162+
$composer->email->variables = Arr::except($mailable->buildViewData(), [
163+
'__laravel_mailable',
164+
]);
162165

163166
$localeToUse = $composer->locale ?? app()->currentLocale();
164167

0 commit comments

Comments
 (0)