- How do I install the SMSC.ru notification channel for Laravel?
- Install it with composer require laravel-notification-channels/smsc-ru, then publish the package config file and add your SMSC.ru credentials to .env. You will also add a toSmscru() method to each notification class that should send SMS, and include 'smscru' in the notification's via() array. Budget about one developer-day for setup and staging verification against real handset numbers.
- Which Laravel versions does laravel-notification-channels/smsc-ru support?
- The README targets Laravel 5.3, while an April 2025 release suggests support for later Laravel versions was retrofitted. Do not assume compatibility: check the tagged release's composer.json constraints and run a composer why-not check against your pinned Laravel version. Pay particular attention to Laravel 11 and 12, where bootstrapping and config conventions changed.
- How do I configure SMSC.ru API credentials in Laravel?
- Publish the package configuration file and set SMSCRU_LOGIN and SMSCRU_PASSWORD, or the supported API key, in your .env file. You need an active SMSC.ru account with a positive balance, and in Russia the sender ID must be approved before messages go out. Keep credentials out of version control and use separate values per environment.
- How do I send an SMS with a Laravel notification using SMSC.ru?
- Add a toSmscru() method to your notification class that returns an SmscRuMessage instance, and include 'smscru' in the via() array. Then send the notification normally through Notification::send() or the notifiable's notify() method. The channel inherits Laravel's queueing and routing behavior from the host application.
- How do I route an SMS to a phone number with SMSC.ru notifications?
- Implement routeNotificationForSmscru() on the notifiable model to return the destination phone number. For ad-hoc recipients without a model, use Notification::route('smscru', $phone) before sending. Both approaches feed the same channel and require no extra infrastructure for outbound SMS.
- Does this package support SMS delivery receipts or status callbacks?
- No. The channel covers outbound submission only; delivery-status callbacks from SMSC.ru are explicitly out of scope. If you need delivery receipts, plan to build a custom webhook endpoint and reconcile statuses yourself.
- How does error handling work with the SMSC.ru notification channel?
- Community notification channels typically let HTTP errors fall into Laravel's queue failure path rather than emitting domain events, and this package is a thin HTTP wrapper. Verify the exact contract in the source before relying on it. In production, add your own logging and alerting around failed notifications and confirm that queue retry and backoff semantics match your expectations.
- How can I test SMSC.ru SMS notifications without sending real SMS?
- The package does not document a testing fake, so the approach depends on whether it uses Laravel's Http facade or a bundled client. If it uses Http, you can use Http::fake() to assert the outgoing request; otherwise mock the underlying client. Always do a final staging check against real handset numbers, since gateway behavior and sender ID approval are outside the package.
- Is laravel-notification-channels/smsc-ru safe for production use?
- Code risk is low because it is a thin adapter with no migrations or data model, but supply-chain risk is medium to high: it is a single-maintainer package with 51 stars and few reported dependents. The April 2025 release shows someone is still shipping, which offsets the bus-factor concern somewhat. Use it confidently for peripheral SMS, but pre-empt coupling if SMS becomes a primary authentication or alerting path.
- Can I switch SMS providers later if I use this package?
- There is no provider-agnostic SMS channel interface, so switching vendors later means editing every notification that calls SmscRuMessage::create(). If provider flexibility matters, wrap SMS sending behind your own interface now. Also note that SMSC.ru is a Russian-market gateway; outside RU/CIS, latency, billing, sanctions exposure, and data residency make it a poor fit, so evaluate it only if SMSC.ru is already your chosen provider.