Download the PHP package huangdijia/smsease without Composer
On this page you can find all versions of the php package huangdijia/smsease. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package smsease
Smsease
Installation
composer require huangdijia/smsease
Quickly Start
PHP
- Call
use Huangdijia\Smsease\Smsease;
$config = [
// HTTP request timeout
'timeout' => 5.0,
// Default send options
'default' => [
// Gateway strategy, default: OrderStrategy
'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,
// gateway using
'gateways' => [
'accessyou', 'aliyun',
],
],
// Available gateways
'gateways' => [
'accessyou' => [
'__gateway__' => \Huangdijia\Smsease\Gateways\AccessyouGateway::class, // custom
'account' => 'account',
'password' => 'password',
],
'aliyun' => [
'access_key_id' => '',
'access_key_secret' => '',
'sign_name' => '',
],
//...
],
];
$smsease = new Smsease($config);
$smsease->send(13188888888, [
'content' => 'Your verify code: 1234',
'template' => 'SMS_001',
'data' => [
'code' => 1234
],
]);
Hyperf
- Publish
php bin/hyperf.php vendor:publish "huangdijia/smsease"
- Call
// Make by container
$container = \Hyperf\Utils\ApplicationContext::getcontainer();
$smsease = $container->get(\Huangdijia\Smsease\Smsease::class);
or
// Make by annotation
class Foo
{
@Inject
@var \Huangdijia\Smsease\Smsease::class
private $smsease;
// ...
}
- Options
If you want using coroutine, add class_map setting into config/autoload/annotations.php of your project
return [
'scan' => [
// ...
'class_map' => [
\GuzzleHttp\Client::class => BASE_PATH . '/vendor/huangdijia/smsease/class_map/GuzzleHttp/Client.php',
],
],
];
Laravel
- Publish
php artisan vendor:publish --provider="Huangdijia\Smsease\SmseaseServiceProvider"
- Call
$smsease = app(\Huangdijia\Smsease\Smsease::class);
// or
$smsease = app('smsease');
Link
All versions of smsease with dependencies
PHP Build Version
Package Version
Requires
guzzlehttp/guzzle Version
^6.0|^7.0
overtrue/easy-sms Version ^1.1
alibabacloud/client Version ^1.5
overtrue/easy-sms Version ^1.1
alibabacloud/client Version ^1.5
The package huangdijia/smsease contains the following files
Loading the files please wait ...

