Skip to content

Commit

Permalink
Corrected User Association in Readme (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
surtic86 authored Apr 3, 2024
1 parent 67d0952 commit 0a695b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ class ProductReviewMail extends Mailable
{
// Call associateWith() and the package automatically associates the public
// properties with this mailable.
$this->associateWith($this->product);
$this->associateWith($this->user);
$this->associateWith([$this->product]);

// Or – if you want more control – use the getMailModelsHeader() method
// to get a Header instance and merge it with your own headers.
return new Headers(
text: [
'X-Custom-Header' => 'Custom Value',
...$this->getMailModelsHeader($this->product)->toArray(),
...$this->getMailModelsHeader($this->user)->toArray(),
...$this->getMailModelsHeader([$this->product])->toArray(),
],
);
Expand Down

0 comments on commit 0a695b4

Please sign in to comment.