Lae/app/Notifications/WeComChannel.php

64 lines
1.2 KiB
PHP
Raw Normal View History

2022-12-11 11:33:34 +00:00
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class WeComChannel extends Notification
{
use Queueable;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
2022-12-27 16:25:22 +00:00
* @param mixed $notifiable
*
2022-12-11 11:33:34 +00:00
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
2022-12-27 16:25:22 +00:00
* @param mixed $notifiable
*
* @return MailMessage
2022-12-11 11:33:34 +00:00
*/
public function toMail($notifiable)
{
return (new MailMessage)
2022-12-27 16:25:22 +00:00
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
2022-12-11 11:33:34 +00:00
}
/**
* Get the array representation of the notification.
*
2022-12-27 16:25:22 +00:00
* @param mixed $notifiable
*
2022-12-11 11:33:34 +00:00
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}