Skip to content

Commit

Permalink
fix rendering of notifications with config custom theme
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 18, 2020
1 parent abea927 commit 325a335
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Mail/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,14 @@ public function theme($theme)

return $this;
}

/**
* Get the theme currently being used by the renderer.
*
* @return string
*/
public function getTheme()
{
return $this->theme;
}
}
8 changes: 4 additions & 4 deletions src/Illuminate/Notifications/Messages/MailMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ public function render()
);
}

return Container::getInstance()
->make(Markdown::class)
->theme($this->theme ?: 'default')
->render($this->markdown, $this->data());
$markdown = Container::getInstance()->make(Markdown::class);

return $markdown->theme($this->theme ?: $markdown->getTheme())
->render($this->markdown, $this->data());
}

/**
Expand Down

0 comments on commit 325a335

Please sign in to comment.