combindma/laravel-twilio

Laravel Twillio SMS API Integration

2.1.0 2024-03-16 00:22 UTC

This package is auto-updated.

Last update: 2024-11-16 01:41:13 UTC


README

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

Laravel Twillio SMS API IntegrationLaravel Twillio SMS API Integration

Installation

You can install the package via composer:

composer require combindma/laravel-twilio

You can publish the config file with:

php artisan vendor:publish --tag="laravel-twilio-config"

This is the contents of the published config file:

return [
    /*
    |--------------------------------------------------------------------------
    | SID
    |--------------------------------------------------------------------------
    |
    | Your Twilio Account SID #
    |
    */
    'sid' => env('TWILIO_SID', ''),

    /*
    |--------------------------------------------------------------------------
    | Access Token
    |--------------------------------------------------------------------------
    |
    | Access token that can be found in your Twilio dashboard
    |
    */
    'token' => env('TWILIO_AUTH_TOKEN', ''),

    /*
    |--------------------------------------------------------------------------
    | From Number
    |--------------------------------------------------------------------------
    |
    | The Phone number registered with Twilio that your SMS & Calls will come from
    |
    */
    'from' => env('TWILIO_NUMBER', ''),

    /*
   |--------------------------------------------------------------------------
   | Enable
   |--------------------------------------------------------------------------
   |
   | Enable or disable script rendering. Useful for local development.
   |
   */
    'enabled' => env('TWILIO_ENABLED', true),
];

Usage

use Combindma\Twilio\Facades\Twilio;

Twilio::message($phone, $message);

Testing

composer test

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.