myomyintaung512 / laravel-smspoh-v3
There is no license information available for the latest version (v1.0.5) of this package.
Package info
github.com/myomyintaung512/laravel-smspoh-v3
pkg:composer/myomyintaung512/laravel-smspoh-v3
v1.0.5
2025-02-27 04:20 UTC
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This package provides an easy way to integrate SMSPoh SMS services into your Laravel application.
Installation
composer require myomyintaung512/laravel-smspoh-v3
Publish the configuration file:
php artisan vendor:publish --provider="myomyintaung512\LaravelSmspoh\SMSPohServiceProvider"
Configuration
Add the following variables to your .env file:
SMSPOH_API_KEY=your_api_key SMSPOH_API_SECRET=your_api_secret SMSPOH_SENDER_ID=your_sender_id SMSPOH_BASE_URL=https://v3.smspoh.com/api/rest
Usage
Basic Usage
use myomyintaung512\LaravelSmspoh\Facades\SMSPoh; // Send SMS app()->smspoh->send('1234567890', 'Your message here'); // Check balance $balance = app()->smspoh->balance(); // Send verification SMS app()->smspoh->verify('1234567890', 'Your verification code is: 123456'); // Check message status app()->smspoh->status('message_id');
Using Laravel Notifications
use Illuminate\Notifications\Notification; use myomyintaung512\LaravelSmspoh\SMSPohChannel; class VerificationNotification extends Notification { public function via($notifiable) { return [SMSPohChannel::class]; } public function toSMSPoh($notifiable) { return [ 'to' => $notifiable->phone, 'message' => 'Your verification code is: ' . $this->code ]; } }
License
This package is open-sourced software licensed under the MIT license.