PHP code example of sykez / genusis-sms

1. Go to this page and download the library: Download sykez/genusis-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/ */

    

sykez / genusis-sms example snippets


'genusis-sms' => [
	'client_id' => env('GENUSIS_SMS_CLIENT_ID', null),
	'username' => env('GENUSIS_SMS_USERNAME', null),
	'private_key' => env('GENUSIS_SMS_PRIVATE_KEY', null),
	'url' => env('GENUSIS_SMS_URL', null),
	'debug_log' => env('GENUSIS_SMS_DEBUG_LOG', false),
],

use Sykez\GenusisSms\GenusisSmsChannel;
use Sykez\GenusisSms\GenusisSmsMessage;
use Illuminate\Notifications\Notification;

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

    public function toSms($notifiable)
    {
        return (new GenusisSmsMessage)->content("Hello there!");
    }
}

public function toSms($notifiable)
{
	return (new GenusisSmsMessage)->content("Hello there!")->to(01234567891);
}

public function routeNotificationForSms()
{
    return $this->phone_number;
}

use Illuminate\Support\Facades\Notification;
Notification::route('sms', '01234567891')->notify(new App\Notifications\SendSms(['Hello again.']));