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

Laravel SMS 通知渠道的 MobilyWs 驱动程序

v1.0.0-alpha04 2019-10-30 09:18 UTC

This package is not auto-updated.

Last update: 2024-09-24 09:41:31 UTC


README

安装

要使用 Composer 安装 PHP 客户端库

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

该软件包将自动注册自己。

驱动程序先决条件

MobilyWs 是基于 API 的驱动程序,这需要 Guzzle HTTP 库,可能通过 Composer 软件包管理器安装

composer require composer require guzzlehttp/guzzle

MobilyWs 驱动程序

要使用 MobilyWs 驱动程序,首先安装 Guzzle,然后在 config/services.php 配置文件中将驱动程序选项设置为 mobilyws。接下来,请确保您的 config/services.php 配置文件包含以下选项

    'mobilyws' => [
        // Set yor login credentials to communicate with mobily.ws Api
        'mobile' => env('MOBILYWS_KEY', ''),
        'password' => env('MOBILYWS_KEY', ''),

        // Or use the generated apiKey from your mobily.ws account
        'key' => env('MOBILYWS_KEY', ''),

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

        // Required by mobily.ws Don't Change.
        'applicationType' => 68,

        // Authentication mode. possible values: api, password, or auto
        'authentication' => 'auto',

        // 3 when using UTF-8. Don't Change
        'lang' => '3',

        /*
        |--------------------------------------------------------------------------
        | 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://mobily.ws/api/',
            ],

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

许可证

MobilyWs SMS 通知驱动程序是开源软件,根据 MIT 许可证 许可。