Skip to content

Commit

Permalink
Merge pull request #150 from eklundkristoffer/patch-1
Browse files Browse the repository at this point in the history
fix public properties not available in the view
  • Loading branch information
asahasrabuddhe authored Dec 27, 2022
2 parents 5d68fc8 + cef2c9a commit 6e9a314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mail/Mailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Mailable extends IlluminateMailable
public function mjml($view, array $data = [])
{
$this->mjml = $view;
$this->viewData = array_merge($this->viewData, $data);
$this->viewData = array_merge($this->buildViewData(), $data);

return $this;
}
Expand Down Expand Up @@ -59,7 +59,7 @@ protected function buildView()
*/
protected function buildMjmlView()
{
$view = View::make($this->mjml, $this->viewData);
$view = View::make($this->mjml, $this->buildViewData());
$mjml = new MJML($view);

return [
Expand Down

0 comments on commit 6e9a314

Please sign in to comment.