Skip to content

Commit a5a0350

Browse files
committed
Correct Mail set locale code snippet
1 parent 9d34028 commit a5a0350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mail.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,10 @@ If you have mailable classes that you want to always be queued, you may implemen
617617

618618
Laravel allows you to send mailables in a locale other than the current language, and will even remember this locale if the mail is queued.
619619

620-
To accomplish this, the `Illuminate\Mail\Mailable` class offers a `locale` method to set the desired language. The application will change into this locale when the mailable is being formatted and then revert back to the previous locale when formatting is complete:
620+
To accomplish this, the `Mail` facade offers a `locale` method to set the desired language. The application will change into this locale when the mailable is being formatted and then revert back to the previous locale when formatting is complete:
621621

622-
Mail::to($request->user())->send(
623-
(new OrderShipped($order))->locale('es')
622+
Mail::to($request->user())->locale('es')->send(
623+
new OrderShipped($order)
624624
);
625625

626626
### User Preferred Locales

0 commit comments

Comments
 (0)