tylercd100 / monolog-sms
A Monolog Handler for SMS messaging services such as Twilio, Clickatell and Plivo.
Installs: 155 048
Dependents: 1
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 7
Open Issues: 2
Requires
- php: ^7.2|^8.0
- monolog/monolog: ^2.0
Requires (Dev)
- phpunit/phpunit: ^8.2.3|^9.0
This package is auto-updated.
Last update: 2024-11-29 04:09:38 UTC
README
A Monolog Handler for SMS messaging services
Currently supported
Installation
Install via composer - In the terminal:
composer require tylercd100/monolog-sms
Usage
For Plivo:
use Tylercd100\Monolog\Handler\PlivoHandler; $handler = new PlivoHandler($token,$auth_id,$fromPhoneNumber,$toPhoneNumber); $logger = new Monolog\Logger('channel.name'); $logger->pushHandler($handler); $logger->addCritical("Foo Bar!");
For Twilio:
use Tylercd100\Monolog\Handler\TwilioHandler; $handler = new TwilioHandler($secret,$sid,$fromPhoneNumber,$toPhoneNumber); $logger = new Monolog\Logger('channel.name'); $logger->pushHandler($handler); $logger->addCritical("Foo Bar!");
For Clickatell:
use Tylercd100\Monolog\Handler\ClickatellHandler; $handler = new ClickatellHandler($authToken,$fromPhoneNumber (/*Optional*/),$toPhoneNumber (/*String|Array*/)); $logger = new Monolog\Logger('channel.name'); $logger->pushHandler($handler); $logger->addCritical("Foo Bar!");