meniloss / sms-factor
该包的最新版本(2.0.x-dev)没有可用的许可证信息。
Meniloss SmsFactor Bundle
2.0.x-dev
2022-09-12 09:30 UTC
Requires
- php: >=8.1.0
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2024-09-12 13:47:35 UTC
README
使用composer安装
composer require meniloss/sms-factor
添加到您的AppKernel
$bundles = [ ... new Meniloss\SmsFactorBundle\MenilossSmsFactorBundle(), ];
config.yml
您必须在smsfactor.com的账户中找到您的API密钥并添加
meniloss_sms_factor: api_key: 123456789acdefghij
使用方法
发送消息
$smsFactor = $this->get('meniloss.sms_factor'); $response = $smsFactor->message()->send([ 'to' => '33601000000', 'text' => 'Did you ever dance whith the devil in the pale moonlight ?' ]); print_r($response->getJson());