halilcosdu/laravel-signalwire
Composer 安装命令:
composer require halilcosdu/laravel-signalwire
包简介
Laravel SignalWire - Send Fax From Laravel
README 文档
README
Send Fax From Laravel package provides a Laravel-friendly interface for interacting with the SignalWire API, a cloud communication platform that offers services like voice, messaging, and video.
The package offers a variety of methods to interact with different aspects of the SignalWire services:
-
Fax Operations: You can send, receive, update, and delete faxes. This includes methods like
faxes,sendFax,getFax,updateFax, anddeleteFax. -
Phone Numbers: You can list, create, update, and delete incoming phone numbers. This includes methods like
listIncomingPhoneNumbers,createIncomingPhoneNumber,getIncomingPhoneNumber,updateIncomingPhoneNumber,deleteIncomingPhoneNumber, andgetAvailablePhoneNumbers. -
Fax Media: You can manage media related to faxes. This includes methods like
faxMedias,getFaxMedia, anddeleteFaxMedia.
The package uses the Facade pattern, which means you can access all these methods statically via the SignalWire facade. This makes it easy to use the SignalWire services in your Laravel application.
Installation
You can install the package via composer:
composer require halilcosdu/laravel-signalwire
You can publish the config file with:
php artisan vendor:publish --tag="signalwire-config"
This is the contents of the published config file:
return [ 'project_id' => env('SIGNALWIRE_PROJECT_ID'), 'token' => env('SIGNALWIRE_TOKEN'), 'space_url' => env('SIGNALWIRE_SPACE_URL'), 'incoming_phone_number_status_callback_url' => env('SIGNALWIRE_INCOMING_PHONE_NUMBER_STATUS_CALLBACK_URL'), //create or update IncomingPhoneNumbers 'incoming_phone_number_voice_url' => env('SIGNALWIRE_INCOMING_PHONE_NUMBER_VOICE_URL'),// create or update IncomingPhoneNumbers ];
Usage
use HalilCosdu\SignalWire\Facades\SignalWire; // Fax Operations SignalWire::faxes(?string $dateCreateAfter = null, ?string $dateCreatedOnOrBefore = null, ?string $from = null, ?string $to = null) SignalWire::sendFax(string $mediaUrl, string $to, string $from, ?string $statusCallback = null, string $quality = 'standard') SignalWire::getFax(string $sid) SignalWire::updateFax(string $sid, string $status) SignalWire::deleteFax(string $sid) // Phone Number Operations SignalWire::listIncomingPhoneNumbers(?string $beta = null, ?string $friendlyName = null, ?string $origin = null, ?string $phoneNumber = null) SignalWire::createIncomingPhoneNumber(string $areaCode, string $phoneNumber, ?string $addressSid = null, ?string $friendlyName = null, ?string $identitySid = null, ?string $smsApplicationSid = null, ?string $smsFallbackMethod = null, ?string $smsFallbackUrl = null, ?string $smsMethod = null, ?string $smsUrl = null, ?string $statusCallback = null, ?string $statusCallbackMethod = null, ?string $trunkSid = null, ?string $voiceApplicationSid = null, bool $voiceCallerIdLookup = false, ?string $voiceFallbackMethod = null, ?string $voiceFallbackUrl = null, ?string $voiceMethod = null, string $voiceReceiveMode = 'fax', ?string $voiceUrl = null) SignalWire::getIncomingPhoneNumber(string $phoneNumberSid) SignalWire::updateIncomingPhoneNumber(string $phoneNumberSid, string $friendlyName, string $smsUrl, string $smsMethod, string $voiceUrl, string $voiceMethod) SignalWire::deleteIncomingPhoneNumber(string $phoneNumberSid) // Available Numbers to Buy SignalWire::getAvailablePhoneNumbers(string $isoCountry, ?string $areaCode, bool $beta = false, ?string $contains = null, bool $excludeAllAddressRequired = false, bool $excludeLocalAddressRequired = false, bool $faxEnabled = false, string $inRegion = null, bool $mmsEnabled = false, bool $voiceEnabled = false) // Fax Media SignalWire::faxMedias(string $faxSid) SignalWire::getFaxMedia(string $faxSid, string $mediaSid) SignalWire::deleteFaxMedia(string $faxSid, string $mediaSid)
Example
use HalilCosdu\SignalWire\Facades\SignalWire; // Send Fax SignalWire::sendFax('https://www.example.com/fax.pdf', '+1234567890', '+0987654321', 'https://www.example.com/fax-status-callback', 'standard');
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
halilcosdu/laravel-signalwire 适用场景与选型建议
halilcosdu/laravel-signalwire 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.33k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2024 年 05 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「HalilCosdu」 「laravel-signalwire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 halilcosdu/laravel-signalwire 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 halilcosdu/laravel-signalwire 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 halilcosdu/laravel-signalwire 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel S3-compatible log system.
Laravel Ollama API Wrapper - Interact with the Ollama API
Alfabank REST API integration
Laravel Fine tuner is a package designed for the Laravel framework that automates the fine-tuning of OpenAI models. It simplifies the process of adjusting model parameters to optimize performance, tailored specifically for Laravel applications. This tool is ideal for developers looking to enhance AI
Laravel package for Accurate Online API integration.
Laravel AI Chatbot Package
统计信息
- 总下载量: 1.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-05