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
The `Arr::join` method joins array elements with a string. Using this method's second argument, you may also specify the joining string for the final element of the array:
658
+
The `Arr::join` method joins array elements with a string. Using this method's third argument, you may also specify the joining string for the final element of the array:
The `fake` function resolves a [Faker](https://github.com/FakerPHP/Faker) singleton from the container, which can be useful when creating fake data in model factories, database seeding, tests, and prototyping views:
Alternatively, you may pass an array to the `fake` method. The array's keys should represent URL patterns that you wish to fake and their associated responses. The `*` character may be used as a wildcard character. Any requests made to URLs that have not been faked will actually be executed. You may use the `Http` facade's `response` method to construct stub / fake responses for these endpoints:
603
+
Alternatively, you may pass an array to the `fake` method. The array's keys should represent URL patterns that you wish to fake and their associated responses. The `*` character may be used as a wildcard character. You may use the `Http` facade's `response` method to construct stub / fake responses for these endpoints:
604
604
605
605
```php
606
606
Http::fake([
@@ -612,7 +612,7 @@ Http::fake([
612
612
]);
613
613
```
614
614
615
-
If you would like to specify a fallback URL pattern that will stub all unmatched URLs, you may use a single `*` character:
615
+
Any requests made to URLs that have not been faked will actually be executed. If you would like to specify a fallback URL pattern that will stub all unmatched URLs, you may use a single `*` character:
Copy file name to clipboardExpand all lines: original-en/mail.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@
36
36
<aname="introduction"></a>
37
37
## Introduction
38
38
39
-
Sending email doesn't have to be complicated. Laravel provides a clean, simple email API powered by the popular [Symfony Mailer](https://symfony.com/doc/current/mailer.html) component. Laravel and Symfony Mailer provide drivers for sending email via SMTP, Mailgun, Postmark, Resend, Amazon SES, and `sendmail`, allowing you to quickly get started sending mail through a local or cloudbased service of your choice.
39
+
Sending email doesn't have to be complicated. Laravel provides a clean, simple email API powered by the popular [Symfony Mailer](https://symfony.com/doc/current/mailer.html) component. Laravel and Symfony Mailer provide drivers for sending email via SMTP, Mailgun, Postmark, Resend, Amazon SES, and `sendmail`, allowing you to quickly get started sending mail through a local or cloud-based service of your choice.
40
40
41
41
<aname="configuration"></a>
42
42
### Configuration
@@ -87,7 +87,7 @@ After configuring your application's default mailer, add the following options t
87
87
],
88
88
```
89
89
90
-
If you are not using the United States [Mailgun region](https://documentation.mailgun.com/en/latest/api-intro.html#mailgun-regions), you may define your region's endpoint in the `services` configuration file:
90
+
If you are not using the United States [Mailgun region](https://documentation.mailgun.com/docs/mailgun/api-reference/#mailgun-regions), you may define your region's endpoint in the `services` configuration file:
91
91
92
92
```php
93
93
'mailgun' => [
@@ -253,6 +253,7 @@ To accomplish this, you should define a mailer within your application's `mail`
253
253
'mailgun',
254
254
'sendmail',
255
255
],
256
+
'retry_after' => 60,
256
257
],
257
258
258
259
// ...
@@ -278,6 +279,7 @@ The `roundrobin` transport allows you to distribute your mailing workload across
Laravel provides a variety of methods for inspecting your mailable's structure. In addition, Laravel provides several convenient methods for testing that your mailable contains the content that you expect. These methods are: `assertSeeInHtml`, `assertDontSeeInHtml`, `assertSeeInOrderInHtml`, `assertSeeInText`, `assertDontSeeInText`, `assertSeeInOrderInText`, `assertHasAttachment`, `assertHasAttachedData`, `assertHasAttachmentFromStorage`, and `assertHasAttachmentFromStorageDisk`.
1184
-
1185
-
As you might expect, the "HTML" assertions assert that the HTML version of your mailable contains a given string, while the "text" assertions assert that the plain-text version of your mailable contains a given string:
1185
+
Laravel provides a variety of methods for inspecting your mailable's structure. In addition, Laravel provides several convenient methods for testing that your mailable contains the content that you expect:
1186
1186
1187
1187
```php tab=Pest
1188
1188
use App\Mail\InvoicePaid;
@@ -1203,10 +1203,11 @@ test('mailable content', function () {
1203
1203
$mailable->assertHasMetadata('key', 'value');
1204
1204
1205
1205
$mailable->assertSeeInHtml($user->email);
1206
-
$mailable->assertSeeInHtml('Invoice Paid');
1206
+
$mailable->assertDontSeeInHtml('Invoice Not Paid');
@@ -1251,6 +1253,8 @@ public function test_mailable_content(): void
1251
1253
}
1252
1254
```
1253
1255
1256
+
As you might expect, the "HTML" assertions assert that the HTML version of your mailable contains a given string, while the "text" assertions assert that the plain-text version of your mailable contains a given string.
1257
+
1254
1258
<aname="testing-mailable-sending"></a>
1255
1259
### Testing Mailable Sending
1256
1260
@@ -1462,6 +1466,10 @@ class LogMessage
1462
1466
Laravel includes a variety of mail transports; however, you may wish to write your own transports to deliver email via other services that Laravel does not support out of the box. To get started, define a class that extends the `Symfony\Component\Mailer\Transport\AbstractTransport` class. Then, implement the `doSend` and `__toString` methods on your transport:
1463
1467
1464
1468
```php
1469
+
<?php
1470
+
1471
+
namespace App\Mail;
1472
+
1465
1473
use MailchimpTransactional\ApiClient;
1466
1474
use Symfony\Component\Mailer\SentMessage;
1467
1475
use Symfony\Component\Mailer\Transport\AbstractTransport;
@@ -1506,7 +1514,7 @@ class MailchimpTransport extends AbstractTransport
1506
1514
}
1507
1515
```
1508
1516
1509
-
Once you've defined your custom transport, you may register it via the `extend` method provided by the `Mail` facade. Typically, this should be done within the `boot` method of your application's `AppServiceProvider` service provider. A `$config` argument will be passed to the closure provided to the `extend` method. This argument will contain the configuration array defined for the mailer in the application's `config/mail.php` configuration file:
1517
+
Once you've defined your custom transport, you may register it via the `extend` method provided by the `Mail` facade. Typically, this should be done within the `boot` method of your application's `AppServiceProvider`. A `$config` argument will be passed to the closure provided to the `extend` method. This argument will contain the configuration array defined for the mailer in the application's `config/mail.php` configuration file:
1510
1518
1511
1519
```php
1512
1520
use App\Mail\MailchimpTransport;
@@ -1551,7 +1559,7 @@ Once the Brevo mailer package has been installed, you may add an entry for your
Copy file name to clipboardExpand all lines: original-en/notifications.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ public function via(object $notifiable): array
145
145
### Queueing Notifications
146
146
147
147
> [!WARNING]
148
-
> Before queueing notifications you should configure your queue and [start a worker](/docs/{{version}}/queues#running-the-queue-worker).
148
+
> Before queueing notifications, you should configure your queue and [start a worker](/docs/{{version}}/queues#running-the-queue-worker).
149
149
150
150
Sending notifications can take time, especially if the channel needs to make an external API call to deliver the notification. To speed up your application's response time, let your notification be queued by adding the `ShouldQueue` interface and `Queueable` trait to your class. The interface and trait are already imported for all notifications generated using the `make:notification` command, so you may immediately add them to your notification class:
Copy file name to clipboardExpand all lines: original-en/pulse.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -486,6 +486,9 @@ Pulse will use your default [Redis connection](/docs/{{version}}/redis#configura
486
486
PULSE_REDIS_CONNECTION=pulse
487
487
```
488
488
489
+
> [!WARNING]
490
+
> When using the Redis ingest driver, your Pulse installation should always use a different Redis connection than your Redis powered queue, if applicable.
491
+
489
492
When using the Redis ingest, you will need to run the `pulse:work` command to monitor the stream and move entries from Redis into Pulse's database tables.
0 commit comments