A simple Symfony bundle for Twilio Api.
Add Twilio Bundle in your composer.json:
{
"require": {
"driveop/twilio-bundle": "^0.1"
}
}
Now tell composer to download the bundle by running the command:
$ php composer.phar update "driveop/twilio-bundle"
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new DriveOp\TwilioBundle\DriveOpTwilioBundle()
);
}
# app/config/config.yml
driveop:
twilio:
twilio_sid: %twilio_sid%
twilio_token: %twilio_token%
Using service
<?php
$twilioClient = $this->get('twilio_client');
?>
##Example
###Send WhatsApp message
<?php
$message = $twilioClient->sendWhatsAppMessage($to, $from, $body);
?>
How can I help you explore Laravel packages today?