PHPackages                             gonzalezfj/smsc - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. gonzalezfj/smsc

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gonzalezfj/smsc
===============

Sends SMS using SMSC API

v0.1.1(8y ago)292[1 issues](https://github.com/gonzalezfj/smsc/issues)MITPHPPHP &gt;=5.6.4

Since Nov 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gonzalezfj/smsc)[ Packagist](https://packagist.org/packages/gonzalezfj/smsc)[ Docs](https://github.com/gonzalezfj/smsc)[ RSS](/packages/gonzalezfj-smsc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

SMSC Notification Channel For Laravel 5.3
=========================================

[](#smsc-notification-channel-for-laravel-53)

[![Packagist Pre Release](https://camo.githubusercontent.com/6e160130e7d9e61f6c86f349c6c36d35b1e97d5b4d7f11af241cfdbcb2fe4131/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f676f6e7a616c657a666a2f736d73632e737667)](https://packagist.org/packages/gonzalezfj/smsc)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/30b93339773f4d4e651289af346b252c5b94cda3b7344c5bff4f47cb625bf620/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f676f6e7a616c657a666a2f736d73632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gonzalezfj/smsc)[![StyleCI](https://camo.githubusercontent.com/984c0558f9a3d4ff8267079a257d27339b76c84bff75bb947a20bd6ed85d9186/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131313734303333372f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/111740337)[![SensioLabsInsight](https://camo.githubusercontent.com/bef168221ab5500f46f92c310be26ff5d9b6630c440da2766cacc59ea3024983/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f63653566313131662d316265342d343834382d613837642d3762323537306431353364342e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/ce5f111f-1be4-4848-a87d-7b2570d153d4)[![Quality Score](https://camo.githubusercontent.com/93d8bfb94d091ce224b4a862d3a31a425e16252b8383afb081a37bc928b2ffe2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676f6e7a616c657a666a2f736d73632e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gonzalezfj/smsc)[![Code Coverage](https://camo.githubusercontent.com/4a6a758c77cb6164bf12cb9c937e4d540cb6b1fa1d5131054e4a9e628360ff77/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f676f6e7a616c657a666a2f736d73632f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gonzalezfj/smsc/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/70e4274a66412723d73046eb40714073dd62ea36c236d33ab2e49cefd88f41d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676f6e7a616c657a666a2f736d73632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gonzalezfj/smsc)

This package makes it easy to send notifications using [SMSC](https://www.smsc.com.ar/) with Laravel 5.3.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the SMSC service](#setting-up-the-SMSC-service)
- [Usage](#usage)
    - [Available methods](#available-methods)
    - [Available events](#available-events)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require gonzalezfj/smsc
```

Next add the service provider to your `config/app.php`:

```
...
'providers' => [
    ...
    NotificationChannels\SMSC\SMSCServiceProvider::class,
],
...
```

### Setting up the SMSC service

[](#setting-up-the-smsc-service)

You will need to register to SMSC to use this channel.

The configuration given by the SMSC should be included within your `config/services.php` file:

```
...
'SMSC' => [
    'http'       => [
        'endpoint' => 'https://www.smsc.com.ar/api/0.3/',
    ],
    'alias'   => '',
    'apikey'   => '',
    'timeout'    => 60,
],
...
```

Usage
-----

[](#usage)

Follow Laravel's [documentation](https://laravel.com/docs/master/notifications) to add the channel to your Notification class.

```
use NotificationChannels\SMSC\SMSCChannel;
use NotificationChannels\SMSC\SMSCMessage;

class ResetPasswordWasRequested extends Notification
{
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [SMSCChannel::class];
    }

    /**
     * Get the SMSC representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return string|\NotificationChannels\SMSC\SMSCMessage
     */
    public function toSMSC($notifiable) {
        return "Test notification";
        // Or
        return new SMSCMessage("Test notification", $notifiable->mobile_number);
    }
}
```

Don't forget to place the dedicated method for SMSC inside your notifiables. (e.g. User)

```
class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForSMSC()
    {
        return "115371885";
    }
}
```

### Available methods

[](#available-methods)

Check out the constructor signature of SMSCMessage:

```
public function __construct($content, $number);
```

### Available events

[](#available-events)

SMSC Notification channel comes with two handy events which provides the required information about the SMS messages.

1. **Message Was Sent** (`NotificationChannels\SMSC\Events\MessageWasSent`)

This event is fired shortly after the message is sent. An example handler is presented below:

```
namespace App\Listeners;

use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use NotificationChannels\SMSC\Events\MessageWasSent;

class SentMessageHandler
{
    /**
     * Handle the event.
     *
     * @param  MessageWasSent  $event
     * @return void
     */
    public function handle(MessageWasSent $event)
    {
        $response = $event->response;
        $message = $event->message;

        // The message properties.
        \Log::info($message->content());
        \Log::info($message->number());

        // Message as array.
        \Log::info($message->toArray());

        // API Response properties.
        \Log::info($response->isSuccess());
        \Log::info($response->errorCode());
        \Log::info($response->errorMessage());
    }
}
```

2. **Sending Message** (`NotificationChannels\SMSC\Events`)

This event is fired just before the send request. An example handler is presented below.

```
namespace App\Listeners;

use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use NotificationChannels\SMSC\Events\SendingMessage;

class SendingMessageHandler
{
    /**
     * Handle the event.
     *
     * @param  SendingMessage  $event
     * @return void
     */
    public function handle(SendingMessage $event)
    {
        $message = $event->message;

        // The message properties.
        \Log::info($message->content());
        \Log::info($message->number());

        // Message as array.
        \Log::info($message->toArray());
    }
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Facundo J Gonzalez](https://github.com/gonzalezfj)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~144 days

Total

2

Last Release

2946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82d6e8df1c09fee4a57f0031de4a39d525386a70b1dc9ca52c484005cd4f6eb6?d=identicon)[gonzalezfj](/maintainers/gonzalezfj)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gonzalezfj-smsc/health.svg)

```
[![Health](https://phpackages.com/badges/gonzalezfj-smsc/health.svg)](https://phpackages.com/packages/gonzalezfj-smsc)
```

###  Alternatives

[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[illuminate/http

The Illuminate Http package.

11936.0M5.0k](/packages/illuminate-http)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)

PHPackages © 2026

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