Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Added support for notifications MailChannel using messages that implements Mailable contract #15318

Merged
merged 5 commits into from
Sep 7, 2016

Conversation

butschster
Copy link
Contributor

...

public function toMail($notifiable)
{
      return (new \App\Mail\OrderShipped($this->order))->to($notifiable->routeNotificationFor('mail'));
}
...

@butschster butschster changed the title Add support for notifications MailChannel using messages that implements Mailable contract Added support for notifications MailChannel using messages that implements Mailable contract Sep 7, 2016
@themsaid themsaid changed the title Added support for notifications MailChannel using messages that implements Mailable contract [5.3] Added support for notifications MailChannel using messages that implements Mailable contract Sep 7, 2016
@themsaid
Copy link
Member

themsaid commented Sep 7, 2016

Can you please add some tests?

$mock = Mockery::mock(Illuminate\Contracts\Mail\Mailable::class);

$mock->shouldReceive('send')->once()->with(Mockery::on(function($mailer) {
if (! ($mailer instanceof \Illuminate\Contracts\Mail\Mailer)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No leading slash please. Also, no extra brackets are needed.

@taylorotwell taylorotwell merged commit 6cac4df into laravel:5.3 Sep 7, 2016
@tillkruss
Copy link
Collaborator

@butschster It would be nice if that would be in the docs, feel like submitting a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants