Skip to content

Commit

Permalink
fix bug mailable
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtrovich committed Feb 23, 2024
1 parent c1deb17 commit 05025ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mail/Mailable.php
Expand Up @@ -85,7 +85,9 @@ public function content(): array
*/
public function from(): array
{
return [];
$from = config('mail.from');

return [$from['address'] ?? '', $from['name'] ?? ''];
}

/**
Expand Down Expand Up @@ -159,7 +161,7 @@ public function data(): array
$data = [];

foreach ($reflection->getProperties(ReflectionProperty::IS_PUBLIC) as $prop) {
$data[$prop->getName()] = $prop->getValue();
$data[$prop->getName()] = $prop->getValue($this);
}

return array_merge($data, $this->with());
Expand Down

0 comments on commit 05025ca

Please sign in to comment.