From 9dd0b5c03312e1e11769e2e15daaaf65448d3f9f Mon Sep 17 00:00:00 2001 From: ReeceM Date: Sat, 19 Nov 2022 15:50:39 +0200 Subject: [PATCH] wip --- src/MailEclipse.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MailEclipse.php b/src/MailEclipse.php index 920f4c7..ebee7bc 100644 --- a/src/MailEclipse.php +++ b/src/MailEclipse.php @@ -553,7 +553,10 @@ protected static function mailablesList() $collection = collect($fqcns)->map(function ($mailable) { return $mailable; })->reject(function ($object) { - return ! method_exists($object['namespace'], 'build'); + return ! array_search( + 'Illuminate\Contracts\Mail\Mailable', + class_implements($object['namespace'] + )); }); return $collection; @@ -810,7 +813,7 @@ public static function buildMailable($instance, $type = 'call') if ($type === 'call') { if (self::handleMailableViewDataArgs($instance) !== null) { - return app()->call([self::handleMailableViewDataArgs($instance), $method]); + return self::handleMailableViewDataArgs($instance); } if ($method == 'content') {