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
$driver
protected
string
$driver
$enabled
protected
bool
$enabled
$twilioClient
protected
Client|null
$twilioClient
= null
Methods
__construct()
public
__construct() : mixed
getDriver()
Get current driver
public
getDriver() : string
Return values
stringisEnabled()
Check if SMS service is enabled
public
isEnabled() : bool
Return values
boolsend()
Send SMS message
public
send(string $to, string $body) : bool
Parameters
- $to : string
- $body : string
Return values
boolinitializeTwilio()
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
boolsendViaTwilio()
Send SMS via Twilio
protected
sendViaTwilio(string $to, string $body) : bool
Parameters
- $to : string
- $body : string