Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twilio Laravel Package

aloha/twilio

Laravel Twilio integration for sending SMS and making calls via a simple facade or IoC-resolved manager. Supports multiple config connections and sender numbers, plus artisan commands and a publishable config file.

View on GitHub
Deep Wiki
Context7

Laravel Twillio API Integration

Frequently asked questions about Twilio
How do I install aloha/twilio in a Laravel app?
Run composer require aloha/twilio. The package registers Aloha\Twilio\Manager, aliased as twilio, and Aloha\Twilio\TwilioInterface, plus the twilio:sms and twilio:call artisan commands. Publish the config file with php artisan vendor:publish --provider="Aloha\Twilio\Support\Laravel\ServiceProvider" and add credentials to your environment. The README also shows manual facade alias registration in config/app.php, so verify whether package auto-discovery is declared for your Laravel version.
Does aloha/twilio support Laravel 9, 10, or 11?
Current support is not explicitly guaranteed in the package context. The last release was July 2021, before Laravel 9, 10, and 11, so on Laravel 9+ treat it as a fork or adopt candidate rather than a default dependency. On Laravel 5 through 8 and PHP 7.x through 8.0 it is close to drop-in. Run composer require aloha/twilio in a scratch branch against your exact Laravel and PHP pins and inspect anything that gets downgraded; if it forces a downgrade of twilio/sdk or framework packages, stop and either fork with widened constraints or call twilio/sdk directly.
How do I send an SMS with the Twilio facade in Laravel?
After configuring credentials and registering the facade alias, call Twilio::message($phone, $message) to send through the default connection. Use Twilio::from('call_center')->message($phone, $message) to select a specific config entry and sender number. You can also resolve Aloha\Twilio\TwilioInterface from the container instead of using the facade. Make sure the facade alias is available or that package discovery has registered it before relying on the short Twilio name.
How do I configure multiple Twilio accounts or sender numbers?
Publish config/twilio.php and define multiple entries for the accounts or sender numbers you need. The Manager acts as a multi-connection factory, and Twilio::from('board_room') selects the named connection and its from number. Keep account SID, auth token, and sender values environment-driven rather than committed to config. This is useful for subaccounts or separate business units while keeping one facade entry point.
Why does the README tell me to edit config/app.php for the Twilio facade?
The README follows the pre-Laravel 5.5 convention of manually adding 'Twilio' => 'Aloha\Twilio\Support\Laravel\Facade' to the aliases array. That suggests the package may not declare Laravel package auto-discovery, so verify rather than assume. If discovery is not declared, the manual alias is required for the short Twilio facade name. Test facade resolution and both artisan commands on your target Laravel version before adopting it broadly.
What Twilio SDK version does aloha/twilio require?
The exact twilio/sdk range is not specified in the provided context, but the package constrains twilio/sdk and that constraint drives your CVE and API-deprecation posture. Inspect composer.lock after installation to see which SDK version is resolved. An old pin can force an unsupported SDK into your lockfile. If the constraint is too narrow, fork the package with widened constraints or use twilio/sdk directly behind your own wrapper.
Can I use aloha/twilio for OTP or two-factor authentication?
It is a send-SMS wrapper, not a verification primitive. For OTP or 2FA, Twilio Verify is usually the right primitive because it handles code generation, delivery, expiry, and verification flow concerns. You could send a code SMS through this package, but you would own storage, expiry, rate limiting, retries, and abuse controls. Choose Verify or a dedicated authentication flow rather than treating this package as a complete 2FA solution.
Does aloha/twilio handle queued SMS, retries, webhooks, or delivery status?
No. It is a thin convenience layer over twilio/sdk and does not provide queueing, retry or backoff, webhook ingestion, delivery-status tracking, or message templating. You must build those concerns around it or use Twilio features and SDK calls directly. For production, wrap it behind your own SmsSender interface and add queued jobs, retry policy, and failure alerting. Inbound messages and status callbacks also require separate implementation.
How can I test aloha/twilio without writing integration code?
Install the package, set credentials, publish config/twilio.php, and run the twilio:sms and twilio:call artisan commands as a smoke test. This confirms registration and basic outbound connectivity without building application code. Do this in a throwaway app matching your target Laravel and PHP versions first. In automated tests, bind a fake SmsSender or mock your own interface rather than calling Twilio for real.
Is aloha/twilio maintained, and what are the alternatives?
It is effectively dormant upstream: the last release was July 2021, the README shows a Travis-era build badge, and the listed dependents count is 0. Alternatives are a fork with modernized constraints and CI, or a thin internal wrapper over twilio/sdk. The package is MIT licensed and small enough to replace, so hide it behind your own SmsSender interface to keep entry and exit cheap. A documented fallback to direct twilio/sdk is reasonable, roughly a day's work given the thin wrapper.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo