UserCertifyFailNotification.php
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace App\Notifications;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class UserCertifyFailNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via(): array
{
return ['sms', 'jPush'];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public function toJPush(User $notifiable): array
{
return [
'user' => $notifiable->getKey(),
'title' => '认证申请未通过',
'content' => '点击查看详情',
'data' => ['type' => 'OpenApp', 'value' => '']
];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public function toSms(User $notifiable): array
{
return [
'phone' => $notifiable->getPhoneNotificationKey(),
'data' => [
'template' => 'SMS_254165982',
'content' => '您的账号审核未通过,请前往海星试唱APP/小程序查看详情,修改审核信息后重新提交。'
]
];
}
}