vgr-system / vgr
视频游戏内容评级系统
2.0.0
2022-07-22 11:45 UTC
Requires
- php: >=5.4.0
README
用于发送短信的laravel包(伊朗所有网关)
安装
要安装此包,请编辑项目的 composer.json 文件以要求 pamenary/LaravelSms
"require": { "pamenary/LaravelSms": "dev-master" },
现在,更新Composer
composer update
Composer完成后,您需要添加服务提供者。打开 app/config/app.php,并在提供者数组中添加一个新项。
Pamenary\LaravelSms\Laravel\SmsServiceProvider::class,
接下来,添加一个门面以方便使用。在 app/config/app.php 中,向别名数组添加以下行
'Sms' => Pamenary\LaravelSms\Laravel\Facade\Sms::class,
发布配置文件
php artisan vendor:publish
要更改用户名、密码和其他配置更改,请修改 app/config/sms.php
用法
发送消息
Sms::sendSMS('09136000415', 'text message'); // send message for a person Sms::sendSMS(['09136000415', '09361265987'], 'text mesage'); // send message for persons
更改网关
$sms = new Sms(new \Pamenary\LaravelSms\Gateways\AzinwebGateway()); $sms->sendSMS(['09136000415'], 'text message');
获取余额
Sms::getCredit();