shafimsp/laravel-sms-notification-channel-smscountry-driver

Laravel SMS Notification Channel 的 SMS Country 驱动器

v1.0.0-alpha03 2020-07-16 12:50 UTC

This package is auto-updated.

Last update: 2024-09-16 22:14:40 UTC


README

安装

要使用 Composer 安装 PHP 客户端库

composer require shafimsp/laravel-sms-notification-channel-smscountry-driver

该包将自动注册自己。

驱动器先决条件

SMS Country 是基于 API 的驱动器,这需要 Guzzle HTTP 库,可以通过 composer 包管理器安装

composer require composer require guzzlehttp/guzzle

SMS Country 驱动器

要使用 SMS Country 驱动器,首先安装 Guzzle,然后在您的 config/services.php 配置文件中设置驱动器选项为 SMS Country。接下来,验证您的 config/services.php 配置文件是否包含以下选项

    'smscountry' => [
        // Set yor login credentials to communicate with mobily.ws Api
        'user' => env('SMS_COUNTRY_USER', ''),
        'password' => env('SMS_COUNTRY_PASSWORD', ''),

        'sms_from' => env('SMS_FROM', ''),

        /*
        |--------------------------------------------------------------------------
        | Define options for the Http request. (Guzzle http client options)
        |--------------------------------------------------------------------------
        |
        | You do not need to change any of these settings.
        |
        |
        */
        'guzzle' => [
            'client' => [
                // The Base Uri of the Api. Don't Change this Value.
                'base_uri' => 'http://api.smscountry.com/',
            ],

            // Request Options. http://docs.guzzlephp.org/en/stable/request-options.html
            'request' => [
                'http_errors' => true,
                // For debugging
                'debug' => false,
            ],
        ],
    ]

许可证

SMS Country SMS Notification 驱动器是开源软件,许可协议为 MIT 许可证