Skip to content

Commit cca5167

Browse files
committed
[7.x] Expand Mailable interface
- expand Mailable interface since `PendingMail::fill()` used some not existed method from the Mailable interface now. And it will caused an fatal error. Base PR: laravel#30088
1 parent 5b2ce9b commit cca5167

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

src/Illuminate/Contracts/Mail/Mailable.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,39 @@ public function queue(Queue $queue);
3030
* @return mixed
3131
*/
3232
public function later($delay, Queue $queue);
33+
34+
/**
35+
* Set the recipients of the message.
36+
*
37+
* @param object|array|string $address
38+
* @param string|null $name
39+
* @return self
40+
*/
41+
public function cc($address, $name = null);
42+
43+
/**
44+
* Set the recipients of the message.
45+
*
46+
* @param object|array|string $address
47+
* @param string|null $name
48+
* @return $this
49+
*/
50+
public function bcc($address, $name = null);
51+
52+
/**
53+
* Set the recipients of the message.
54+
*
55+
* @param object|array|string $address
56+
* @param string|null $name
57+
* @return $this
58+
*/
59+
public function to($address, $name = null);
60+
61+
/**
62+
* Set the locale of the message.
63+
*
64+
* @param string $locale
65+
* @return $this
66+
*/
67+
public function locale($locale);
3368
}

src/Illuminate/Mail/PendingMail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected function fill(MailableContract $mailable)
177177
{
178178
return tap($mailable->to($this->to)
179179
->cc($this->cc)
180-
->bcc($this->bcc), function ($mailable) {
180+
->bcc($this->bcc), function (MailableContract $mailable) {
181181
if ($this->locale) {
182182
$mailable->locale($this->locale);
183183
}

0 commit comments

Comments
 (0)