PHPackages                             ilgala/laravel-smsfactor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ilgala/laravel-smsfactor

AbandonedArchivedLibrary[API Development](/categories/api)

ilgala/laravel-smsfactor
========================

A SMSFactor bridge for Laravel 5 https://www.smsfactor.it/api/

v1.0.0(9y ago)116MITPHPPHP &gt;=5.5.9

Since Jan 11Pushed 9y agoCompare

[ Source](https://github.com/IlGala/laravel-smsfactor)[ Packagist](https://packagist.org/packages/ilgala/laravel-smsfactor)[ Docs](https://github.com/IlGala/laravel-smsfactor)[ RSS](/packages/ilgala-laravel-smsfactor/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (9)Versions (5)Used By (0)

Laravel SMSFactor
=================

[](#laravel-smsfactor)

Laravel SMSFactor was created by, and is maintained by [Filippo Galante](https://github.com/IlGala), and is a [PHP SMSFactor API](https://www.smsfactor.it/docs/API/SMSFactor-DOC-API%20IT%20V3.pdf) bridge for [Laravel 5](http://laravel.com). The source code is inspired by the repositories created by [Graham Campbell](https://github.com/GrahamCampbell) and utilises his [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-GitHub/releases), [license](LICENSE), and [contribution guidelines](CONTRIBUTING.md). In order to send SMSs you have to create a [SMSFactor](https://www.smsfactor.com/) account, and you'll be free to try all its features.

[![Latest Version on Packagist](https://camo.githubusercontent.com/d71418fc68020a7039b27296699a2effa9e448b659a34908df752f3c954250b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f496c47616c612f6c61726176656c2d736d73666163746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/IlGala/laravel-smsfactor)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/13c42d8af266717f807a5c5a7e7772ccb1adcb61923bddb767b4c17ef8c12143/68747470733a2f2f7374796c6563692e696f2f7265706f732f37383131353530302f736869656c643f6272616e63683d6d6173746572)](link-style)[![Build Status](https://camo.githubusercontent.com/407873a0f187da4f58fa51065cca04e3c1e1a94f833de7fdfaf4c078ebc195b5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f496c47616c612f6c61726176656c2d736d73666163746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/IlGala/laravel-smsfactor)[![Coverage Status](https://camo.githubusercontent.com/fe7fb53436a9ace6eb08bb801748586e60ab45cf38abed1e488669236126087c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f496c47616c612f6c61726176656c2d736d73666163746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/IlGala/laravel-smsfactor/code-structure)[![Quality Score](https://camo.githubusercontent.com/854403b7f88ddf6c20fffa75ed33d7dc70d9d8ea9b911e338fa7a7a7d75f6a6e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f496c47616c612f6c61726176656c2d736d73666163746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/IlGala/laravel-smsfactor)[![Total Downloads](https://camo.githubusercontent.com/d310c8d87537a8d0e319cb3d1c6073e182c3e799f4da7051667e446da0354ae1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f496c47616c612f6c61726176656c2d736d73666163746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/IlGala/laravel-smsfactor)

Installation
------------

[](#installation)

Either [PHP](https://php.net) 5.5+ or [HHVM](http://hhvm.com) 3.6+ are required.

To get the latest version of Laravel SMSFactor, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require IlGala/laravel-smsfactor
```

Instead, you may of course manually update your require block and run `composer update` if you so choose:

```
{
    "require": {
        "IlGala/laravel-smsfactor": "^1.0"
    }
}
```

You will also need to install at least one of the following dependencies for each driver:

- The buzz connector requires `"kriswallsmith/buzz": "^0.15"` in your `composer.json`.
- The guzzle connector requires `"guzzle/guzzle": "^3.7"` in your `composer.json`.
- The guzzlehttp connector requires `"guzzlehttp/guzzle": "^5.0"` or `"guzzlehttp/guzzle": "^6.0"` in your `composer.json`.

Once Laravel SMSFactor is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `'IlGala\SMSFactor\SMSFactorServiceProvider'`

You can register the SMSFactor facade in the `aliases` key of your `config/app.php` file if you like.

- `'SMSFactor' => 'IlGala\SMSFactor\Facades\SMSFactor'`

Configuration
-------------

[](#configuration)

Laravel SMSFactor requires connection configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/smsfactor.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are two config options:

##### Default Connection Name

[](#default-connection-name)

This option (`'default'`) is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is `'main'`.

##### SMSFactor Connections

[](#smsfactor-connections)

This option (`'connections'`) is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like.

Usage
-----

[](#usage)

##### SMSFactorManager

[](#smsfactormanager)

This is the class of most interest. It is bound to the ioc container as `'smsfactor'` and can be accessed using the `Facades\SMSFactor` facade. This class implements the `ManagerInterface` by extending `AbstractManager`. The interface and abstract class are both part of [Graham Campbell Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package, so you may want to go and checkout the docs for how to use the manager class over at [that repo](https://github.com/GrahamCampbell/Laravel-Manager#usage).

##### Facades\\SMSFactor

[](#facadessmsfactor)

This facade will dynamically pass static method calls to the `'smsfactor'` object in the ioc container which by default is the `SMSFactorManager` class.

##### SMSFactorServiceProvider

[](#smsfactorserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

##### Real Examples

[](#real-examples)

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is `main`. Depending on the `accept` attribute setted in the config file, the response will be automatically returned as decoded JSON or [`SimpleXMLElement`](http://php.net/manual/en/class.simplexmlelement.php)After you enter your authentication details in the config file, it will just work:

```
use IlGala\SMSFactor\Facades\SMSFactor;
// you can alias this in config/app.php if you like

$total_credits = SMSFactor::credits();
// Check SMS Factor documentation for more information about the results:
/*
 * $total_credits (JSON format):
 * {
 *  "credits": "2420",
 *  "message": "OK"
 * }
 *
 * $total_credits (XML format):
 *
 *
 *  2420
 *  OK
 *
 */
```

The smsfactor manager will behave like it is a `\SMSFactor\SMSFactor` class. If you want to call specific connections, you can do with the `connection` method:

```
use IlGala\SMSFactor\Facades\SMSFactor;

// the alternative connection is the other example provided in the default config
SMSFactor::connection('alternative')->credits()->credits;

// let's check how long we have until the limit will reset
SMSFactor::connection('alternative')->credits()->credits;
```

With that in mind, note that:

```
use IlGala\SMSFactor\Facades\SMSFactor;

// writing this:
SMSFactor::connection('main')->credits();

// is identical to writing this:
SMSFactor::credits();

// and is also identical to writing this:
SMSFactor::connection()->credits();

// this is because the main connection is configured to be the default
SMSFactor::getDefaultConnection(); // this will return main

// we can change the default connection
SMSFactor::setDefaultConnection('alternative'); // the default is now alternative
```

If you prefer to use dependency injection over facades like me, then you can easily inject the manager like so:

```
use IlGala\SMSFactor\SMSFactorManager;
use Illuminate\Support\Facades\App; // you probably have this aliased already

class SMSSender
{
    protected $smsfactor;

    public function __construct(SMSFactorManager $smsfactor)
    {
        $this->smsfactor = $smsfactor;
    }

    public function sendSms($params, $method, $simulate = false)
    {
        $this->smsfactor->send($params, $method, $simulate = false);
    }
}

App::make('SMSSender')->bar();
```

For more information on how to use the `\SMSFactor\SMSFactor` class we are calling behind the scenes here, check out the [SMSFactor API doc](https://www.smsfactor.it/docs/API/SMSFactor-DOC-API%20IT%20V3.pdf), and the manager class at .

##### Further Information

[](#further-information)

There are other classes in this package that are not documented here. This is because they are not intended for public use and are used internally by this package.

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Filippo Galante at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

Laravel SMSFactor is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

3452d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcd582fcb8d6129305d8f72485d53593551e4ddd87ec3d322f92875f9ad4366d?d=identicon)[IlGala](/maintainers/IlGala)

---

Top Contributors

[![ilgala](https://avatars.githubusercontent.com/u/1577699?v=4)](https://github.com/ilgala "ilgala (9 commits)")

---

Tags

laravellaravel-5-packagelaravel-packagesmssmsfactorlaravelpackageSMSFactorIlGala

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ilgala-laravel-smsfactor/health.svg)

```
[![Health](https://phpackages.com/badges/ilgala-laravel-smsfactor/health.svg)](https://phpackages.com/packages/ilgala-laravel-smsfactor)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M7.8k](/packages/larastan-larastan)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M284](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M169](/packages/laravel-ai)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k11.8M113](/packages/nuwave-lighthouse)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M131](/packages/laravel-mcp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
