alaaelsaid / laravel-wati-whatsapp
此包用于与 wati 服务集成
1.0.1
2024-09-26 21:27 UTC
README
您可以通过 Composer 安装此包。
composer require alaaelsaid/laravel-wati-whatsapp
发布
安装后发布配置文件
php artisan vendor:publish --tag="wati"
环境
在 .env 文件中,您可以添加以下键
WATI_TEMPLATE=template_name WATI_ENDPOINT=endpoint WATI_ACCESS_TOKEN=access_token
用法
use Alaaelsaid\LaravelWatiWhatsapp\Facade\Whatsapp; // to send single phone number; Whatsapp::send('+201007153686', "hello world", "John Smith"); // to send multi phone numbers; // $users => collection of users to send a mutiple phone numbers; // column => whatsapp column in users table; // name => the column name of the user in the users table ex: [ name, fullname ]; Whatsapp::multi(message: "hello world", users: $users, column: 'whatsapp', name: 'John Smith'');