v0.1.10
This commit is contained in:
22
kernel/modules/notification/channels/SmsChannel.php
Normal file
22
kernel/modules/notification/channels/SmsChannel.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\modules\notification\channels;
|
||||
|
||||
use kernel\modules\notification\contracts\NotificationChannelInterface;
|
||||
use kernel\modules\notification\contracts\NotificationMessage;
|
||||
use kernel\modules\user\models\User;
|
||||
|
||||
class SmsChannel implements NotificationChannelInterface
|
||||
{
|
||||
public function send(NotificationMessage $notification, User $user): bool
|
||||
{
|
||||
if (empty($user->phone)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Интеграция с SMS-сервисом
|
||||
//$smsService = new \App\Services\SmsService();
|
||||
//return $smsService->send($user->phone, $notification->getMessage());
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user