creativecrafts/laravel-twillio-sms

A simple package to send sms messages using twillio

1.0.0 2024-03-17 06:09 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a simple package to send sms messages using twillio sms service.

Installation

You can install the package via composer:

composer require creativecrafts/laravel-twillio-sms

You can publish the config file with:

php artisan vendor:publish --tag="twillio-sms-config"

This is the contents of the published config file:

return [
    'account_sid' => env('TWILIO_ACCOUNT_SID'),
    'auth_token' => env('TWILIO_AUTH_TOKEN'),
    'sms_from' => env('TWILIO_SMS_FROM'),
];

Usage

 // You can use the facade like this
$laravelTwillioSms = \creativeCrafts\LaravelTwillioSms\Facades\LaravelTwillioSms::sendSms('+1234566798', 'Hello World from Laravel Twillio SMS');

// or it can be used like this

$laravelTwillioSms = (new \creativeCrafts\LaravelTwillioSms\LaravelTwillioSms())('+1234566798', 'Hello World from Laravel Twillio SMS');

// or it can be used like this

$laravelTwillioSmsClient = new \creativeCrafts\LaravelTwillioSms\LaravelTwillioSms();
$laravelTwillioSms = $laravelTwillioSmsClient->sendSms('+1234566798', 'Hello World from Laravel Twillio SMS');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.