Skip to content

Commit

Permalink
Add later() method to MailableMailer as per docs
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Sep 9, 2016
1 parent 86dd18d commit 62dd11d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Illuminate/Mail/MailableMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,22 @@ public function queue(Mailable $mailable)
return $this->mailer->queue($mailable);
}

/**
* Deliver the queued message after the given delay.
*
* @param \DateTime|int $delay
* @param Mailable $mailable
* @return mixed
*/
public function later($delay, Mailable $mailable)
{
$mailable = $mailable->to($this->to)
->cc($this->cc)
->bcc($this->bcc);

return $this->mailer->later($delay, $mailable);
}

/**
* Populate the mailable with the addresses.
*
Expand Down

0 comments on commit 62dd11d

Please sign in to comment.