Download the PHP package mortezamasumi/fb-sms without Composer
On this page you can find all versions of the php package mortezamasumi/fb-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mortezamasumi/fb-sms
More information about mortezamasumi/fb-sms
Files in mortezamasumi/fb-sms
Package fb-sms
Short Description SMS notification channel for Laravel & Filament with pluggable operators (Fake, Sabanovin, Smsir).
License MIT
Homepage https://github.com/mortezamasumi/fb-sms
Informations about the package fb-sms
FB SMS — Laravel SMS Notification Channel
A Laravel notification channel that sends SMS through pluggable operators. It ships with the Sabanovin and Smsir (sms.ir) operators, plus a Fake operator for local development and testing.
Features
- Drop-in Laravel channel — send via the standard
Notification::route('sms', ...)->notify(...)flow - Pluggable operators — swap providers through config without touching your notification classes
- Built-in operators —
Sabanovin,Smsir, and aFakelogger for local development - Prepend/append text — configure a prefix/suffix (e.g. an opt-out line) applied to every message
- Recipient fallback — uses
routeNotificationFor('sms', $notification), then$notifiable->mobile - Lifecycle hooks —
beforeSend(),send(),afterSend(), plussucceeded()/failed()on notifications - Graceful failure — send/credit errors are caught, logged, and reported to your notification's
failed()
Installation
Publish the config file:
Configuration
Usage
Create a notification and send it through the sms channel:
Send it to a notifiable model that exposes a phone number (either mobile or routeNotificationFor('sms', ...)):
Or send to a phone number directly:
Recipient resolution
$notifiable->routeNotificationFor('sms', $notification)if it exists, then$notifiable->mobileif it is set, then- the
fb-sms.receiverconfig value, or - the route value passed to
Notification::route('sms', ...).
Success and failure hooks
Credit lookup
Custom operators
Implement your own provider by extending Mortezamasumi\FbSms\Contracts\Operator and implement send() and credit():
Register it via config:
If your operator needs app-level setup, override public static function initialize(FbSmsServiceProvider $provider): void — it runs once before the operator is first used.
Support policy
| PHP | Laravel |
|---|---|
| 8.3 | 12 |
Testing
The test suite covers operator responses, recipient resolution, lifecycle hooks, and failure paths using Http::fake() and the bundled Fake operator — no real SMS is sent.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover a security vulnerability, please review our security policy on how to report it.
Changelog
Please see CHANGELOG for recent changes.
License
The MIT License (MIT). See LICENSE.md for details.