You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use the template, you simply have to add the `WithMailTemplate` trait to your mailable.
60
60
61
-
This will enforce you to implement the `getReplacers` method, this should return an array of replacers to your template. The array may contain instances of `Binarcode\LaravelMailator\Replacers\Replacer` or even `Closure` instances.
61
+
This will enforce you to implement the `getReplacers` method, this should return an array of replacers to your template.
62
+
The array may contain instances of `Binarcode\LaravelMailator\Replacers\Replacer` or even `Closure` instances.
62
63
63
-
Mailator shipes with a builtin replacer `ModelAttributesReplacer`, it will automaticaly replace attributes from the model you provide to placeholders.
64
+
Mailator shipes with a builtin replacer `ModelAttributesReplacer`, it will automaticaly replace attributes from the
65
+
model you provide to placeholders.
64
66
65
-
The last step is how to say to your mailable what template to use. This could be done into the build method as shown bellow:
67
+
The last step is how to say to your mailable what template to use. This could be done into the build method as shown
68
+
bellow:
66
69
67
70
```php
68
71
class WelcomeMailatorMailable extends Mailable
@@ -94,10 +97,9 @@ class WelcomeMailatorMailable extends Mailable
94
97
}
95
98
```
96
99
97
-
98
100
## Scheduler
99
101
100
-
To setup a mail to be sent after or before an event, you can do this by using `MailatorSchedule`.
102
+
To setup a mail to be sent after or before an event, you can do this by using `MailatorSchedule`.
The `constraint` mutator accept an instance of `Binarcode\LaravelMailator\Constraints\SendScheduleConstraint`, based on this the Mailator will decide to send or to not send the email.
121
+
The `constraint` mutator accept an instance of `Binarcode\LaravelMailator\Constraints\SendScheduleConstraint`, based on
122
+
this the Mailator will decide to send or to not send the email.
120
123
121
124
Let's assume we have this `BeforeInvoiceExpiresConstraint` constraint:
0 commit comments