PHP code example of myomyintaung512 / laravel-smspoh-v3

1. Go to this page and download the library: Download myomyintaung512/laravel-smspoh-v3 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

myomyintaung512 / laravel-smspoh-v3 example snippets


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');

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
        ];
    }
}
bash
php artisan vendor:publish --provider="myomyintaung512\LaravelSmspoh\SMSPohServiceProvider"