Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Add theme to mailable properties #33218

Merged
merged 2 commits into from
Jun 15, 2020
Merged

Conversation

basselhossam
Copy link
Contributor

this allows the user to change the theme in the runtime and reflect it in queue because when the object is serialize for queue $this->theme would be gone if it's not preserved in the object properties

for example if my __construct looks like this

public function __construct($user)
{
     $this->theme = 'default-' . $user->user_lang;
}

I'm send an email to user and based on the user language I would like to set the theme

so by adding $theme to the properties it will be serialized and can be retrieved in the queue correctly

@taylorotwell taylorotwell merged commit 44879ec into laravel:7.x Jun 15, 2020
@GrahamCampbell GrahamCampbell changed the title add theme to mailable properties [7.x] Add theme to mailable properties Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants