LaravelPackages.net
Acme Inc.
Toggle sidebar
myomyintaung512/laravel-smspoh-v3

342
0
v1.0.5
About myomyintaung512/laravel-smspoh-v3

myomyintaung512/laravel-smspoh-v3 is a Laravel package. It currently has 0 GitHub stars and 342 downloads on Packagist (latest version v1.0.5). Install it with composer require myomyintaung512/laravel-smspoh-v3. Discover more Laravel packages by myomyintaung512 or browse all Laravel packages to compare alternatives.

Last updated

Laravel SMSPoh V3 Integration

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.

Comments