palpalani / laravel-bandwidth-api
This is my package LaravelBandwidthApi
Fund package maintenance!
palPalani
Installs: 1 901
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- bandwidth/iris: ^4.0
- bandwidth/sdk: ^10.0
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14
Requires (Dev)
- brianium/paratest: ^6.2|^7.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0|^7.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Simple Laravel wrapper for BandWidth API SDK.
Installation
You can install the package via composer:
composer require palpalani/laravel-bandwidth-api
You can publish and run the migrations with:
php artisan vendor:publish --provider="palPalani\LaravelBandwidthApi\LaravelBandwidthApiServiceProvider" --tag="laravel-bandwidth-api-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="palPalani\LaravelBandwidthApi\LaravelBandwidthApiServiceProvider" --tag="laravel-bandwidth-api-config"
This is the contents of the published config file:
return [ 'messaging' => [ 'username' => env('BANDWIDTH_MESSAGING_USERNAME'), 'password' => env('BANDWIDTH_MESSAGING_PASSWORD'), ], 'voice' => [ 'username' => env('BANDWIDTH_VOICE_USERNAME'), 'password' => env('BANDWIDTH_VOICE_PASSWORD'), ], 'twoFactor' => [ 'username' => env('BANDWIDTH_TWO_FACTOR_USERNAME'), 'password' => env('BANDWIDTH_TWO_FACTOR_PASSWORD'), ], 'webRtc' => [ 'username' => env('BANDWIDTH_WEBRTC_USERNAME'), 'password' => env('BANDWIDTH_WEBRTC_PASSWORD'), ], ];
Usage
Sending basic SMS text message using Bandwidth API.
$from = ''; $to = ''; $bandwidth = new palPalani\Bandwidth(); echo $bandwidth->sendMessage($from, $to, 'Hello, Greetings!');
Accessing dashboard API:
$bandwidth = new palPalani\Bandwidth(); $account = $bandwidth->getAccount();
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.