定制 fahad-larasoft/tallbob 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fahad-larasoft/tallbob

Composer 安装命令:

composer require fahad-larasoft/tallbob

包简介

It handles Tall Bob SMS API via simple Facade

README 文档

README

Laravel Package to send SMS/MMS using Tall Bob API

Installation

Install via composer

composer require fahad-larasoft/tallbob

Register Service Provider

Note! This and next step are optional if you use laravel>=5.5 with package auto discovery feature.

Add service provider to config/app.php in providers section

Larasoft\TallBobSms\ServiceProvider::class,

Register Facade

Register package facade in config/app.php in aliases section

Larasoft\TallBobSms\Facades\TallBobSms::class,

Publish Configuration File

php artisan vendor:publish --provider="Larasoft\TallBobSms\ServiceProvider" --tag="config"

When published, the config/tallbobsms.php config file contains:

return [
    /**
     * Sender Id to be sent with request
     */
    'sender_id' => env('TALLBOB_SENDER_ID', env('APP_NAME')),

    /**
     * API Username provided by Tall Bob for API
     */
    'api_username' => env('TALLBOB_API_USERNAME', ''),

    /**
     * API Key provided by Tall Bob for API
     */
    'api_key' => env('TALLBOB_API_KEY', ''),

    /**
     * To check if API is in test mode
     */
    'test_mode' => env('TALLBOB_TEST_MODE', false),
];

You can change it according to your needs.

Usage

  • Send MMS
 TallBobSms::message($message)
            ->senderId($sender_id)
            ->number($mobile_number)    // with country code
            ->subject($subject)
            ->fileUrl($file_url)        // URL of file src
            ->sendMMS();
  • Send SMS
 TallBobSms::message($message)
            ->senderId($sender_id)
            ->number($mobile_number)    // with country code
            ->send();

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-24