Documentation

SmsService
in package

Table of Contents

Properties

$driver  : string
$enabled  : bool
$twilioClient  : Client|null

Methods

__construct()  : mixed
getDriver()  : string
Get current driver
isEnabled()  : bool
Check if SMS service is enabled
send()  : bool
Send SMS message
initializeTwilio()  : void
Initialize Twilio client if credentials are available
sendViaLog()  : bool
Log SMS message instead of sending
sendViaTwilio()  : bool
Send SMS via Twilio

Properties

$twilioClient

protected Client|null $twilioClient = null

Methods

getDriver()

Get current driver

public getDriver() : string
Return values
string

isEnabled()

Check if SMS service is enabled

public isEnabled() : bool
Return values
bool

send()

Send SMS message

public send(string $to, string $body) : bool
Parameters
$to : string
$body : string
Return values
bool

initializeTwilio()

Initialize Twilio client if credentials are available

protected initializeTwilio() : void

sendViaLog()

Log SMS message instead of sending

protected sendViaLog(string $to, string $body) : bool
Parameters
$to : string
$body : string
Return values
bool

sendViaTwilio()

Send SMS via Twilio

protected sendViaTwilio(string $to, string $body) : bool
Parameters
$to : string
$body : string
Return values
bool

        
On this page

Search results