承接 magic-systems-io/laravel-notifyre-sms 相关项目开发

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

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

magic-systems-io/laravel-notifyre-sms

最新稳定版本:0.3.0

Composer 安装命令:

composer require magic-systems-io/laravel-notifyre-sms

包简介

A Notifyre wrapper for laravel

README 文档

README

A Laravel package for sending SMS messages through the Notifyre API. Provides direct SMS sending, Laravel notification integration, CLI commands, and REST API endpoints with optional database persistence.

Tests Coverage Status

Jumpstart

1) Install

composer require magic-systems-io/laravel-notifyre-sms

2) (Optional) Publish config

php artisan notifyre:publish-config

3) Configure .env

php artisan notifyre:publish-env

Then edit your .env file:

NOTIFYRE_API_KEY=your_api_key_here
NOTIFYRE_WEBHOOK_SECRET=your_webhook_secret_here
# NOTIFYRE_LOG_LEVEL=debug  # Optional: emergency|alert|critical|error|warning|notice|info|debug

4) (Optional) Publish migration

php artisan notifyre:publish-migration

5) Migrate (for persistence)

php artisan migrate

6) Send your first SMS

use MagicSystemsIO\Notifyre\DTO\SMS\Recipient;
use MagicSystemsIO\Notifyre\DTO\SMS\RequestBody;
use MagicSystemsIO\Notifyre\Enums\NotifyreRecipientTypes;

notifyre()->send(new RequestBody(
    body: 'Hello World!',
    recipients: [new Recipient(NotifyreRecipientTypes::MOBILE_NUMBER->value, '+1234567890')]
));

Or via Artisan:

php artisan sms:send --message "Hello from Notifyre!" --recipient "+1234567890"

Endpoints (default prefix /api/notifyre)

  • POST /api/notifyre/sms — Send SMS (201 on acceptance)
  • GET /api/notifyre/sms — List local messages (requires sender on authenticated user)
  • GET /api/notifyre/sms/{id} — Get local message
  • GET /api/notifyre/sms/notifyre — List via Notifyre API (proxy)
  • GET /api/notifyre/sms/notifyre/{id} — Get via Notifyre API (proxy)
  • POST /api/notifyre/sms/webhook — Delivery callback handler

Commands

  • php artisan sms:send — Send SMS
  • php artisan sms:list — List/filter SMS (see --help)
  • php artisan notifyre:publish* — Publish config/env snippets

Logging

The package creates a dedicated log channel (notifyre) that:

  • Respects APP_DEBUG - defaults to info in production, debug in development
  • Can be customized via NOTIFYRE_LOG_LEVEL in .env
  • Falls back to your app's LOG_LEVEL if set
  • Logs to storage/logs/notifyre_sms.log (or .log files based on your default channel config)

Requirements

  • PHP 8.3+
  • Laravel 12.20+
  • Notifyre API account (for sms driver)

Docs

See the full documentation: README.

License

MIT License — see LICENSE.

Contributing

See CONTRIBUTING .

Support

  • Read docs
  • Try examples in usage
  • Open a GitHub issue if needed

Troubleshooting

Provider not auto-discovered? If the package isn't working, manually register it in bootstrap/providers.php:

return [
    // Other Service Providers...
    MagicSystemsIO\Notifyre\Providers\NotifyreServiceProvider::class,
];

Made with ❤️ by Magic Systems

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-03