ichen/notification

v5.6 2020-12-01 11:32 UTC

This package is auto-updated.

Last update: 2024-09-29 03:58:09 UTC


README

短信通知包

安装

  • 步骤1: composer require ichen/notification
  • 步骤2: php artisan vender:publish // Nexmo\laravel\NexmoServiceProvider && Ichen\Notification\NotificationServiceProvider

配置

  • 在.env文件中新增相关设置

      #mail服務設定
      MAIL_MAILER=smtp
      MAIL_HOST=smtp.gmail.com or other host
      MAIL_PORT=587
      MAIL_USERNAME=your mail account
      MAIL_PASSWORD=your mail password
      MAIL_ENCRYPTION=tls or other type
      MAIL_FROM_ADDRESS=email address
      MAIL_FROM_NAME="${APP_NAME}"
    
      YOUR_EMAIL_NAME=email nickname ex:Ben
    
      #nexmo服務認證
      NEXMO_KEY= 
      NEXMO_SECRET=
    
      #簡訊發送位置
      NEXMO_USERNAME= 
      
      #line bot 編號
      LINE_BEARER=
    

用法

邮件通知

mailNotification(array $mailTo, $subject, $message, array $filePath = [], array $ccTo = [])

参数

line通知

lineNotification($message)

参数

短信通知

smsNotification($phoneNumber, $message)

参数