Download the PHP package misaf/laravel-sms-gateway without Composer

On this page you can find all versions of the php package misaf/laravel-sms-gateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sms-gateway

Laravel SMS Gateway

A driver-based SMS gateway manager for Laravel, with one installable package per provider. Payloads pass through untouched, so every provider's own API fields stay available, and every send attempt, success and failure dispatches an event.

Requires PHP 8.4+ and Laravel 13.

Installation

The core ships only the null driver, which sends nothing and returns a fake successful response — fine for local and testing, but it delivers no messages. For that, install one or more driver packages:

Package Driver Provider
misaf/laravel-sms-gateway-ghasedak ghasedak Ghasedak
misaf/laravel-sms-gateway-ippanel ippanel IPPanel
misaf/laravel-sms-gateway-kavenegar kavenegar Kavenegar
misaf/laravel-sms-gateway-magfa magfa Magfa
misaf/laravel-sms-gateway-melipayamak melipayamak Melipayamak
misaf/laravel-sms-gateway-messagebird messagebird MessageBird
misaf/laravel-sms-gateway-plivo plivo Plivo
misaf/laravel-sms-gateway-smsir smsir SMS.ir
misaf/laravel-sms-gateway-sunway sunway Sunway
misaf/laravel-sms-gateway-textlocal textlocal Textlocal
misaf/laravel-sms-gateway-twilio twilio Twilio
misaf/laravel-sms-gateway-vonage vonage Vonage

All service providers auto-register, and each driver registers itself on the core manager. See each driver's README for its credentials and options.

Usage

Drivers can coexist, and the payload goes straight to the provider, so use the fields its API expects. The facade is the entry point: the container binds only SmsGatewayManager and its sms-gateway alias — the SmsGateway contract is deliberately not bound, so type-hinting it for injection will not resolve.

Events

Every HTTP driver dispatches four events from Misaf\LaravelSmsGateway\Events, each carrying the driver name:

The retry policy uses throw: false, so a rejected send does not raise — SmsSendFailed is how you observe it. A connection error or timeout still raises after the retries are spent, with SmsSendUnreachable dispatched just before it surfaces.

Configuration

config/sms-gateway.php:

Key Env Default
default SMS_GATEWAY_DRIVER null
defaults.server_timeout SMS_GATEWAY_SERVER_TIMEOUT 5
defaults.client_timeout SMS_GATEWAY_CLIENT_TIMEOUT 6
defaults.retry_times SMS_GATEWAY_RETRY_TIMES 2
defaults.retry_sleep_milliseconds SMS_GATEWAY_RETRY_SLEEP_MILLISECONDS 100

The client timeout sits one second above the connection timeout so a slow gateway loses the race. Only connection failures and gateway 5xx responses are retried; a rejected credential or a malformed payload fails on the first attempt.

That is the whole core configuration. The defaults.* values are the fallback for custom drivers only — each first-party driver owns its own timeout.* and retry.* keys with driver-specific environment variables (e.g. SMS_GATEWAY_TWILIO_SERVER_TIMEOUT), so one gateway can be tuned without touching the others. Endpoints and credentials belong to the driver packages, where every credential key and every base_url is required and may not be empty: a missing or empty value fails when the driver is resolved, rather than sending an unauthenticated request or one to a relative URL.

Registering a custom driver

Extend Misaf\LaravelSmsGateway\Drivers\SmsGatewayDriver. The base class owns the timeouts, the retry policy and the events; the driver supplies its name, its authentication, and the call it makes. Constructor values take no defaults — config is the only place a value is written down — and every one the driver cannot work without is guarded with self::requireConfigured(), since a config key that is present but empty passes Config::string().

A driver that needs neither the shared retry policy nor the events may implement Misaf\LaravelSmsGateway\Contracts\SmsGateway directly instead.

Register it from a service provider:

From a package service provider, defer the registration so provider discovery order cannot matter:

The registration key is the name used by SmsGateway::driver('custom'); the driver reads its own configuration and reports its own driverName() on the events, so nothing is inferred from that key.

Contributing

This repository is a monorepo: the core package lives at the root, and every driver lives in Drivers/laravel-sms-gateway-<driver> and is split out to its own read-only repository on release. Open issues and pull requests here.

Changelog

See CHANGELOG for what has changed recently.

License

MIT. See LICENSE.


All versions of laravel-sms-gateway with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.10
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0
spatie/laravel-package-tools Version ^1.93
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package misaf/laravel-sms-gateway contains the following files

Loading the files please wait ...