PHP code example of dubems / app-web-sms

1. Go to this page and download the library: Download dubems/app-web-sms 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/ */

    

dubems / app-web-sms example snippets


// config/app.php
'providers' => [
    ...
    AppWebSms\AppWebSmsServiceProvider::class,
],

// config/services.php
...
'appwebsms' => [
    'username' => 'Your username',
    'password' => 'Your password',
    'sender'   => 'Dubem'
],
...

public function routeNotificationForAppWebSms()
{
    return $this->phone; // where `phone` is a field in your users table;
}
 php
use AppWebSms\AppWebSmsChannel;
use AppWebSms\AppWebSmsMessage;
use Illuminate\Notifications\Notification;

class ValentineDateApproved extends Notification
{
    public function via($notifiable)
    {
        return [AppWebSmsChannel::class];
    }

    public function toAppWebSms($notifiable)
    {
        return (new AppWebSmsMessage('Your {$notifiable->service} account was approved!'));
    }
}