PHPackages                             victorybiz/unified-sms - 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. victorybiz/unified-sms

ActiveLibrary

victorybiz/unified-sms
======================

Unified SMS library package for Laravel and PHP (Non-Laravel) to send text messages through multiple swappable drivers.

v1.1.7(6y ago)11402[1 PRs](https://github.com/victorybiz/unified-sms/pulls)MITPHPPHP &gt;=5.6CI passing

Since Oct 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/victorybiz/unified-sms)[ Packagist](https://packagist.org/packages/victorybiz/unified-sms)[ RSS](/packages/victorybiz-unified-sms/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (13)Used By (0)

Unified SMS
===========

[](#unified-sms)

[![GitHub release](https://camo.githubusercontent.com/5cc8ced3bc591ad652fbccdd8110ba15f0e610983e50b2f67de402f9bb3d4ec6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f766963746f727962697a2f756e69666965642d736d732e737667)](https://packagist.org/packages/victorybiz/unified-sms)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://camo.githubusercontent.com/20685d52c00109a4ba858fb9c4fe853099a904048ca1d5479ce57fbd19c146d4/68747470733a2f2f7472617669732d63692e6f72672f766963746f727962697a2f756e69666965642d736d732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/victorybiz/unified-sms)[![Packagist](https://camo.githubusercontent.com/10bcf67a8cfabd1b6a3032af9035aabda39d119b632d630f84b9962690db02e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766963746f727962697a2f756e69666965642d736d732e737667)](https://packagist.org/packages/victorybiz/unified-sms)

Unified SMS library package for Laravel and PHP (Non-Laravel) to send text messages through multiple swappable drivers.

Supported Drivers and Services
------------------------------

[](#supported-drivers-and-services)

It currently ships with the following drivers:

- `null` - Null (SMS, Voice SMS only) - for test purposes, this driver does nothing.
- `routemobile` - [RouteMobile - RouteSMS](http://routemobile.com/) (SMS only)
- `nexmo` - [Nexmo](http://nexmo.com/) (SMS only)
- `moreify` - [Moreify](http://moreify.com/) (SMS only)
- `betasms` - [BetaSMS](http://betasms.com/) (SMS only)
- `multitexter` - [MultiTexter](https://multitexter.com/) (SMS only)

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

[](#installation)

Install using composer, from the command line run:

```
$ composer require victorybiz/unified-sms
```

### Laravel Project

[](#laravel-project)

Alternatively, you can add `"victorybiz/unified-sms": "^1.1"` to your composer.json file's `require` section and then you'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.

> If you use **Laravel &gt;= 5.5** you can skip this step and go to [**`configuration`**](https://github.com/victorybiz/unified-sms#configuration-laravel)

> If you use **Laravel &lt; 5.5**, you need to register the service provider with the application. Open up `config/app.php` and locate the `providers` key.

```
'providers' => [

    Victorybiz\UnifiedSMS\UnifiedSMSServiceProvider::class,

]
```

And add the UnifiedSMS alias to config/app.php:

```
'aliases' => [

	'UnifiedSMS' => Victorybiz\UnifiedSMS\Facades\UnifiedSMSFacade::class,

]
```

#### Configuration (Laravel)

[](#configuration-laravel)

You must publish the package's configuration files, (unified-sms.php also published with this) And add the UnifiedSMS alias to config/app.php:

```
php artisan vendor:publish --tag=unified-sms
```

Open up `config/unified-sms.php` use the `env` variables to set your DEFAULT DRIVER and API Credentials.

### Usage in Laravel Project

[](#usage-in-laravel-project)

Please use the `UnifiedSMS` Facade

```
use UnifiedSMS;
```

You're good to go, send sms

```
$msg = [
			'from' => 'Your sender ID here', // default_sender_id set in config file will be used if this line is removed or comment out
			'to' => 'The recipent mobile number, international format without the leading plus (+)',
			'text' => 'Your text message here.',
	   ];
$response = UnifiedSMS::sendSMS($msg);
```

### Usage in PHP (Non-Laravel) Project

[](#usage-in-php-non-laravel-project)

Require the vendor autoload file in your php script.

```
require_once 'path/to/vendor/autoload.php';
```

Create a `unified_sms_config.php` file anywhere in your project directory. Enter the following block into your `unified_sms_config.php` and set your DEFAULT DRIVER and API Credentials.

```
