forwebsystem / notificationwhatsapp
dev-master
2024-07-26 12:21 UTC
Requires (Dev)
- guzzlehttp/guzzle: 7.4.*
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-09-26 12:40:53 UTC
README
这里应该放置您的描述。请查看 contributing.md 了解待办事项列表。
安装
通过 Composer
$ composer require forwebsystem/notificationwhatsapp
用法
变更日志
请参阅 变更日志 了解最近更改的详细信息。
测试
$ composer test
贡献
请参阅 contributing.md 了解详细信息和待办事项列表。
安全
如果您发现任何与安全相关的问题,请通过电子邮件 joaopaulo@forwebsystem.com.br 而不是使用问题跟踪器。
致谢
许可协议
许可协议。请参阅 许可文件 了解更多信息。
** 通过 Channel 发送消息
use ForWebSystem\NotificationWhatsApp\Broadcasting\NotificationWhatsAppChannel; use ForWebSystem\NotificationWhatsApp\Services\Interfaces\NotificacaoMensagensInterface;
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [
NotificationWhatsAppChannel::class
];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
*/
public function toWhatsApp($notifiable, NotificacaoMensagensInterface $configuracao)
{
return $configuracao->sendText($phone, $texto);
}
** 通过服务
use ForWebSystem\NotificationWhatsApp\Services\NotificacaoZApiService;
$notificacao = new NotificacaoZApiService($usuario, $idInstancia, $license);
$notificacao->sendText($phone, $texto);