Weave Code
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
Ersalak Laravel Sms

Ersalak Laravel Sms Laravel Package

ersalak/ersalak-laravel-sms

Laravel package for sending SMS via Ersalak API. Provides facade-based methods for simple SMS, P2P messages, OTP template sends, and message status reports. Easy install via Composer, publish config, and set ERSALAK env credentials.

View on GitHub
Deep Wiki
Context7

A modern Laravel SMS client for sending and reporting messages via REST API

Frequently asked questions about Ersalak Laravel Sms
How do I install and configure the Ersalak Laravel SMS package?
Run `composer require ersalak/ersalak-laravel-sms` to install. Publish the config with `php artisan vendor:publish --tag=ersalak-config`, then set your Ersalak credentials in `.env` under `ERSALAK_SMS_USERNAME`, `ERSALAK_SMS_PASSWORD`, and `ERSALAK_SMS_BASE_URL`. No manual provider/facade registration is needed.
Which Laravel versions does this package support?
The package is designed for Laravel 8+ and leverages modern Laravel features like facades and environment variables. Check the package’s Composer requirements for exact version constraints.
Can I send bulk SMS messages (P2P) with this package?
Yes, the package supports Peer-to-Peer (P2P) messaging. Use the `p2p()` facade method with arrays for `source`, `destination`, and `message` parameters to send multiple messages in one call.
How do I handle OTP or template-based SMS messages?
Use the `template()` facade method with a `template_id` and an array of parameters. For example, pass `['code' => 12345]` for an OTP template. The package handles the API call and returns message IDs for tracking.
Does this package support checking SMS delivery status?
Yes, the package includes a `msgStatus()` method to retrieve the status of sent messages. You can use the returned `message_id` from the initial send to fetch the status report later.
How do I log SMS failures or errors in production?
Enable logging by setting `ERSALAK_SMS_LOG=true` in your `.env`. The package will log errors to Laravel’s default log channel. For advanced monitoring, integrate with tools like Sentry or Laravel Horizon.
Can I mock the SMS service for testing?
Yes, you can mock the facade in tests using Laravel’s mocking utilities. For example, use `$this->mock(ErsalakSms::class)->shouldReceive('sendSms')->andReturn(['message_id' => '123'])` to simulate successful sends.
What happens if Ersalak’s API rate limits me?
The package does not include built-in rate limiting. For high-volume projects, defer SMS sends to Laravel’s queue system with delays or implement exponential backoff in your application logic.
Is it possible to switch SMS providers later without rewriting code?
The package is tightly coupled to Ersalak’s API, so switching providers may require refactoring. To mitigate this, abstract the facade behind an interface (e.g., `SmsServiceContract`) and use dependency injection for easier provider swaps.
How do I handle multi-tenancy with separate Ersalak credentials?
For multi-tenancy, dynamically override the `.env` values or use Laravel’s context binding to inject tenant-specific configurations. Store credentials securely in a database or encrypted storage and load them per tenant.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope