承接 webmobyle/africastalking-sms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

webmobyle/africastalking-sms

最新稳定版本:1.0.3

Composer 安装命令:

composer require webmobyle/africastalking-sms

包简介

Africa's Talking SMS integration with logging & DLRs for Laravel.

README 文档

README

Packagist Version License Laravel

Africa's Talking SMS integration with logging & DLRs for Laravel.

🚀 Features

  • Queue-based SMS sending
  • Delivery report (DLR) handling
  • SMS log storage
  • Optional UI for logs and test sends
  • Logs CSV export
  • Test Send UI screen with sandbox support.
  • Publishable views, config, and migrations
  • Laravel 10/11/12 support

See CHANGELOG.md for release history.

📦 Installation

Install via Composer:

composer require webmobyle/africastalking-sms

Publish assets:

php artisan vendor:publish --provider="Webmobyle\AfricasTalkingSms\AfricasTalkingSmsServiceProvider" --tag=africastalking-sms-config

php artisan vendor:publish --provider="Webmobyle\AfricasTalkingSms\AfricasTalkingSmsServiceProvider" --tag=africastalking-sms-migrations

php artisan vendor:publish --provider="Webmobyle\AfricasTalkingSms\AfricasTalkingSmsServiceProvider" --tag=africastalking-sms-views

Run migrations:

php artisan migrate

⚙️ Configuration

Add these keys to your .env:

QUEUE_CONNECTION=database

AFRICASTALKING_USERNAME=sandbox
AFRICASTALKING_API_KEY=your_key
AFRICASTALKING_SENDER_ID=
AFRICASTALKING_DLR_SECRET=local-dlr-secret
AFRICASTALKING_SMS_QUEUE=sms

For DLRs, set in Africa’s Talking dashboard: https://your-app-domain.com/api/sms/dlr?secret=local-dlr-secret

…and the package controller will handle the rest.

👷 Queue Worker

php artisan queue:work --queue=sms,default

🧩 How It Works

SMS Sending

You can send SMS from your app as follows

use Webmobyle\AfricasTalkingSms\SmsSender;

public function test(SmsSender $sms)
{
    $sms->queue('+265991234567', 'Hello from the package');
}

or

app(\Webmobyle\AfricasTalkingSms\SmsSender::class)
    ->queue('+265991234567', 'Another test');

IMPORTANT: Numbers should folow the International E.164 Format. Example: +265991234567. Malawi local formats (e.g. 0991234567) are automatically converted to international format.

📁 Model: SmsMessage

This model conects to a `mysqldatabase connection by default. To modify this behaviour add the following configuration key in theconfig/database.php` file.

'paychangu_connection' => env('AFRICASTALKING_SMS_DB_CONNECTION', 'mysql'),

📃 SMS Logs & 💬 Test Send UI (Both Optional)

By default you’ll have:

Logs: /sms-logs | Route name: sms-logs.index

Test send: /sms-logs/test | Route name: sms-logs.test

Middleware: web, auth

You may customize in the package configuration files as well as in published views.

🧱 Requirements

DependencyVersion
PHP^8.2
Laravel10.x – 12.x
Africa’s Talking PHP SDK (africastalking/africastalking)^3.0

📦 Versioning

This package follows Semantic Versioning (SemVer) — tag releases like v1.0.0, v1.1.0, etc.

🪪 License

This package is open-sourced software licensed under the MIT License.

👤 Author

Barnett Temwa Msiska
Founder, Webmobyle Limited
📧 barnett@webmobyle.com

⭐ Support

If you find this package useful, please star it on Packagist or Bitbucket.
Contributions, pull requests, and issues are welcome!

Email: contact@webmobyle.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-11