UserCertifySuccessNotification.php
1.04 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
<?php
namespace App\Notifications;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class UserCertifySuccessNotification 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'];
}
/**
* @param \App\Models\User $notifiable
* @return array
*/
public function toSms(User $notifiable): array
{
return [
'phone' => $notifiable->getPhoneNotificationKey(),
'data' => [
'template' => 'SMS_254100995',
'content' => '您的账号审核已通过,请前往海星试唱APP/小程序挑选您喜欢的歌曲吧!'
]
];
}
}