PHPackages                             boyo/laravel-sinch - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. boyo/laravel-sinch

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

boyo/laravel-sinch
==================

Laravel notifications with Sinch

v1.1(4y ago)31.5kMITPHPPHP &gt;=7.2

Since Jan 21Pushed 4y ago2 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

Sinch Notification channel
==========================

[](#sinch-notification-channel)

This package adds a notification channel for Sinch services. You can use it to send SMS messages. Other channels might be available in the future.

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

[](#installation)

Install through Composer.

Config
------

[](#config)

Add the following to your services config file.

```
'sinch' => [
	'api_key' => env('SINCH_API_KEY',''),
	'service_plan_id' => env('SINCH_PLAN_ID',''),
	'from' => env('SINCH_FROM',''),
	'prefix' => '',
	'log' => env('SINCH_LOG',true),
	'log_channel' => env('SINCH_LOG_CHANNEL','stack'),
	'send' => env('SINCH_SEND',false),
	'bulglish' => true,
	'allow_multiple' => false,
],
```

- *log* if the messages should be written to a log file
- *log\_channel* the log channel to log messages to
- *send* if the messages should be sent (production/dev environment)
- *bulglish* if cyrillic text should be converted to latin letters for SMS messages (cyrillic messages are limited to 67 characters)
- *allow\_multiple* if SMS messages above 160 characters should be allowed (billed as multiple messages)

Send test
---------

[](#send-test)

To send a test message use the following artisan command:

`php artisan sinch:test phone --message='content' --channel=sms`

Direct usage
------------

[](#direct-usage)

You can instantiate a `Boyo\Sinch\SinchMessage` object and send it immediately.

```
use Boyo\Sinch\SinchMessage;
use Boyo\Sinch\SinchSender;

class MyClass
{
	public function myFunction()
	{
		$message = (new SinchMessage())->to('359888888888')->channel('sms')->sms('SMS text');

		$client = new SinchSender();
		$client->send($message);
	}
}
```

Usage with notifications
------------------------

[](#usage-with-notifications)

1. Create a message file that extends `Boyo\Sinch\SinchMessage`. It can take whatever data you need in the construct and should implement a `vuild()` method that defines the messages text content - a good practice would be to render a view file, so that your message content is in your views. You should only define the methods for the delivery channels that your are going to use.

```
use Boyo\Sinch\SinchMessage;

class MyMessage extends SinchMessage
{
	public function __construct($data)
    {
        $this->id = $data->id; // your unique message id, add other parameters if needed
    }

	public function build() {
		// set your sms text
		$this->sms('SMS text');

		return $this;
	}
}
```

2. In your Notification class you can now include the Sinch channel in the `$via` array returned by the `via()` method.

```
use Boyo\Sinch\SinchChannel;

via($notifiable)
{

	// ...

	$via[] = SinchChannel::class;

	return $via

}
```

Within the same Notification class you should also define a method `toSms()`:

```
public function toSms($notifiable)
{
	return (new MyMessage($unique_id))->to($notifiable->phone)->channel('sms');
}
```

The channel method is where you define the delivery channel you wish to use.

- **sms** delivery by sms only (this is the default value, if you omit the channel method)
- other Sinch channels might be available in the future

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

1779d ago

PHP version history (2 changes)v1.0PHP &gt;=7.0.0

v1.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15925335?v=4)[Boyan Raichev](/maintainers/boyanraichev)[@boyanraichev](https://github.com/boyanraichev)

---

Top Contributors

[![boyanraichev](https://avatars.githubusercontent.com/u/15925335?v=4)](https://github.com/boyanraichev "boyanraichev (3 commits)")

---

Tags

laravelnotificationssmssinch

### Embed Badge

![Health badge](/badges/boyo-laravel-sinch/health.svg)

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

###  Alternatives

[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)

PHPackages © 2026

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