Skip to content
This repository has been archived by the owner on Dec 22, 2019. It is now read-only.

Mailgun custom notification channel #163

Open
Giacomo92 opened this issue Dec 18, 2019 · 0 comments
Open

Mailgun custom notification channel #163

Giacomo92 opened this issue Dec 18, 2019 · 0 comments

Comments

@Giacomo92
Copy link

How can i use this package as custom notification channel?

Something like this:

<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use App\Channels\VoiceChannel;
use App\Channels\Messages\VoiceMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;

class InvoicePaid extends Notification
{
    use Queueable;

    /**
     * Get the notification channels.
     *
     * @param  mixed  $notifiable
     * @return array|string
     */
    public function via($notifiable)
    {
        return [MailgunChannel::class];
    }

    /**
     * Get the voice representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return VoiceMessage
     */
    public function toMailgun($notifiable)
    {
        // ...
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant