apichef/laravel-notify-lk

laravel 的 NotifyLK 通知通道。

v1.0.1 2021-05-03 13:12 UTC

This package is auto-updated.

Last update: 2024-08-29 05:37:06 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

laravel 的 NotifyLK 通知通道。

安装

通过 Composer

$ composer require apichef/laravel-notify-lk

用法

namespace App\Notifications;

use ApiChef\NotifyLK\Contact;
use ApiChef\NotifyLK\NotifyLKChannel;
use ApiChef\NotifyLK\NotifyLKMessage;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class MyNotification extends Notification
{
    use Queueable;

    public function via($notifiable)
    {
        return [
            NotifyLKChannel::class,
        ];
    }

    public function toNotifyLK($notifiable): NotifyLKMessage
    {
        return (new NotifyLKMessage())
            ->content('This is a test message.')
            ->contact(new Contact('John', 'Doe', 'john.doe@example.com', 'No 1, Colombo, Sri Lanka', 'a_group'));
    }
}

变更日志

请参阅 CHANGELOG 了解最近更改的详细信息。

测试

$ composer test

贡献

请参阅 CONTRIBUTINGCODE_OF_CONDUCT 了解详细信息。

安全性

如果您发现任何与安全性相关的问题,请通过电子邮件 milroy@outlook.com 联系,而不是使用问题跟踪器。

致谢

许可证

MIT 许可证(MIT)。请参阅 许可证文件 了解更多信息。