finds.dev← search

// the find

tzsk/sms

★ 321 · PHP · MIT · updated Oct 2026

Laravel SMS Gateway Integration Package

A Laravel package that puts one `Sms::send()` API in front of more than 20 SMS gateways, from Twilio and AWS SNS to regional providers like Kavenegar, Melipayamak and Smsir. It suits Laravel teams that need a provider other than the default, or that want to switch gateways without changing call sites.

- Adding a gateway is one class. Extend `Contracts\Driver`, implement `boot()` and `send()`, and register it in the `map` array. The 20+ drivers in `src/Drivers` all follow that shape, so the contract is clearly proven.

- Provider SDKs are optional Composer requirements, not hard dependencies. An app sending through Twilio doesn't pull in `aws/aws-sdk-php`.

- `via()` and per-call `config()` overrides let one app use several gateways at once. That matters when a regional provider handles one country and a global one handles the rest.

- CI runs PHPStan, Psalm and Pint alongside the test suite. That's more static checking than most small Laravel packages bother with.

- Tests run against mock clients in `tests/Mocks/Drivers`, so a green build shows the package agrees with itself, not that the request shape still matches Twilio or Kavenegar's current API. Gateway APIs change, and the first sign of drift will probably be a user's failed send.

- Pattern drivers take their arguments as a newline-separated string, e.g. `'patterncode=123 \n arg1=name'`. It's parsed at runtime, so a typo in a key shows up as a gateway error, not a PHP error at the call site.

- The README never says what `dispatch()` returns or whether a failed gateway call throws, returns a status, or fails quietly. The custom-driver example mentions a `status` field, but nothing shows what callers should check. For a notification channel, that's the first question someone will ask.

- `tests/Drivers/SmsGateway24.php` has no `Test` suffix. PHPUnit's default discovery skips files like that, so that driver's tests may never run unless `phpunit.xml.dist` overrides the pattern.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →