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
Laravel Sms

Laravel Sms Laravel Package

toplan/laravel-sms

Laravel SMS is a flexible package for sending text messages and verification codes in Laravel apps. It offers pluggable gateways, message templates, rate limiting, queue support, events, and a clean API for reliable SMS delivery, ideal for OTP logins and notifications.

View on GitHub
Deep Wiki
Context7

:iphone::heavy_check_mark:A phone number validation solution based on laravel

Frequently asked questions about Laravel Sms
How do I install toplan/laravel-sms in a Laravel app?
Install it with Composer using composer require toplan/laravel-sms, then publish the package config and any migrations according to the README. It follows standard Laravel package conventions, including service provider auto-discovery, so manual registration is usually unnecessary. Check the composer.json constraints first to confirm your Laravel and PHP versions are supported.
Which Laravel and PHP versions does toplan/laravel-sms support?
The provided context does not list a minimum Laravel or PHP version, and the 2.6.5 release notes are Chinese-only with no explicit requirements statement. Inspect the package composer.json for illuminate/support and php constraints before upgrading. Run your test suite on the exact Laravel line you deploy rather than assuming compatibility.
How do I configure SMS gateways in toplan/laravel-sms?
The package uses pluggable gateways, so you publish its configuration and set the gateway driver plus credentials for your SMS provider. Message content is controlled through templates, which keeps OTP and notification text consistent. Because gateways are pluggable, you can swap providers without rewriting your sending code.
How do I send an OTP verification code with laravel-sms?
Use the package sending API to generate and deliver a verification code to a phone number, with the message body defined in a template. The package also covers phone number validation, so you can validate the submitted code as part of your login or registration flow. Apply rate limiting and queueing so OTP requests do not block requests or invite abuse.
Does laravel-sms support rate limiting and queues for SMS sending?
Yes. The package advertises rate limiting, queue support, and events alongside its gateway and template features. Queueing moves SMS delivery off the request path, while rate limiting helps control cost and abuse on OTP endpoints. Events are useful for logging and for asserting behavior in tests.
What changed in toplan/laravel-sms 2.6.5?
Version 2.6.5 is a patch release scoped to the database logging component. It lets a log record store an array of phone numbers instead of a single value and fixes a failed-update bug. The 2.6.x line implies additive, backward-compatible intent, but the changelog is Chinese-only and does not explicitly state breaking changes or migration steps.
Will the 2.6.5 phone-number array change break existing log rows or queries?
There is a real data-shape risk because existing rows store a scalar phone number while new rows may store an array. Any downstream query or report that filters with WHERE phone = ? or relies on uniqueness/dedupe logic can silently break if it is not normalized for both shapes. Verify that pre-2.6.5 rows remain readable through the package read path and audit indexes before rolling forward.
Does toplan/laravel-sms 2.6.5 require a database migration?
The context does not confirm whether 2.6.5 ships a migration, so read the diff and migration files directly rather than relying on the two-line changelog. Storing an array likely needs a JSON or text column, which could be an additive new column or a destructive type change. Test the migration against a production-shaped snapshot, especially on MySQL 5.7, MariaDB, PostgreSQL, or SQLite where JSON behavior differs.
How do I test laravel-sms without sending real SMS messages?
Because gateways are pluggable, bind a fake or null gateway in your test environment so no real SMS is sent. Assert the generated code, template rendering, rate-limit behavior, and database log records instead of provider responses. If CI uses SQLite, also test the logging path there because JSON/array storage can behave differently from production databases.
Is toplan/laravel-sms maintained and production-ready, and what are the alternatives?
The 2.6.x line is mature and includes queue support, rate limiting, events, gateways, templates, and database logging, but 2.6.5 is a narrow logging patch and the release notes are Chinese-only. Assess release cadence, minimum Laravel/PHP requirements, and PII retention before using it in production. Alternatives include other Laravel SMS/OTP packages; compare gateway coverage, Laravel version support, and migration behavior.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib