PHPackages                             serwer/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. [API Development](/categories/api)
4. /
5. serwer/sms

ActiveLibrary[API Development](/categories/api)

serwer/sms
==========

This is a Laravel package for communication with the API v2 SerwerSMS.pl

11.1k3PHP

Since Aug 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SerwerSMSpl/serwersms-laravel5)[ Packagist](https://packagist.org/packages/serwer/sms)[ RSS](/packages/serwer-sms/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SerwerSMS - Laravel5
====================

[](#serwersms---laravel5)

Klient PHP do komunikacji zdalnej z API v2 SerwerSMS.pl

Zalecane jest, aby komunikacja przez HTTPS API odbywała się z loginów utworzonych specjalnie do połączenia przez API. Konto użytkownika API można utworzyć w Panelu Klienta → Ustawienia interfejsów → HTTP API → Użytkownicy API.

Instalacja
----------

[](#instalacja)

Instalacja odbywa się poprzez composer i dodanie do pliku composer.json poniższego kodu:

```
    {
        "require": {
            "serwer/sms": "dev-master"
        }
        ...
        "repositories" : [{
            "type" : "vcs",
            "url" : "https://github.com/SerwerSMSpl/serwersms-laravel5.git"
         }],
    }
```

Wysyłka SMS
-----------

[](#wysyłka-sms)

app/config/app.php:

```
    return [
	    ...
	    ...
	    'providers' => [
	        ...
	        ...
	        Serwer\Sms\SmsServiceProvider::class,
	    ],
	    'sms'=>[
			'username' => 'username',
			'password' => 'password',
			'api_url'  => 'https://api2.serwersms.pl/',
			'format'   => 'json'
		]
    ]
```

Controller.php

```
	try{

	    $serwersms = new \SMS;

	    // SMS FULL
	    $result = $serwersms->messages->sendSms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'Test FULL message',
	            'INFORMACJA',
	            array(
	                    'test' => true,
	                    'details' => true
	            )
	    );

	    // SMS ECO
	    $result = $serwersms->messages->sendSms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'Test ECO message',
	            null,
	            array(
	                    'test' => true,
	                    'details' => true
	            )
	    );

	    // VOICE from text
	    $result = $serwersms->messages->sendVoice(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            array(
	                    'text' => 'Test message',
	                    'test' => true,
	                    'details' => true
	            )
	    );

	    // MMS
	    $list = $serwersms->files->index('mms');
	    $result = $serwersms->messages->sendMms(
	            array(
	                    '+48500600700',
	                    '+48600700800'
	            ),
	            'MMS Title',
	            array(
	                    'test' => true,
	                    'file_id' => $list->items[0]->id,
	                    'details' => true
	            )
	    );

	    echo 'Skolejkowano: '.$result->queued.'';
	    echo 'Niewysłano: '.$result->unsent.'';

	    foreach($result->items as $sms){

	        echo 'ID: '.$sms->id.'';
	        echo 'NUMER: '.$sms->phone.'';
	        echo 'STATUS: '.$sms->status.'';
	        echo 'CZĘŚCI: '.$sms->parts.'';
	        echo 'WIADOMOŚĆ: '.$sms->text.'';

	    }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Wysyłka spersonalizowanych SMS

```
	try{

	    $serwersms = new \SMS;

	    $messages[] = array(
			'phone' => '500600700',
			'text' => 'First message'
	    );
	    $messages[] = array(
			'phone' => '600700800',
			'text' => 'Second message'
	    );

	    $result = $serwersms->messages->sendPersonalized(
			$messages,
			'INFORMACJA',
			array(
					'test' => true,
					'details' => true
			)
	    );

	    echo 'Skolejkowano: '.$result->queued.'';
	    echo 'Niewysłano: '.$result->unsent.'';

	    foreach($result->items as $sms){

	        echo 'ID: '.$sms->id.'';
	        echo 'NUMER: '.$sms->phone.'';
	        echo 'STATUS: '.$sms->status.'';
	        echo 'CZĘŚCI: '.$sms->parts.'';
	        echo 'WIADOMOŚĆ: '.$sms->text.'';

	    }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Pobieranie raportów doręczeń

```
	try{

    	    $serwersms = new \SMS;

    	    // Get messages reports
    	    $result = $serwersms->messages->reports(array('id' => array('aca3944055')));

    	    foreach($result->items as $sms){

    	        echo 'ID: '.$sms->id.'';
    	        echo 'NUMER: '.$sms->phone.'';
    	        echo 'STATUS: '.$sms->status.'';
    	        echo 'SKOLEJKOWANO: '.$sms->queued.'';
    	        echo 'WYSŁANO: '.$sms->sent.'';
    	        echo 'DORĘCZONO: '.$sms->delivered.'';
    	        echo 'NADAWCA: '.$sms->sender.'';
    	        echo 'TYP: '.$sms->type.'';
    	        echo 'WIADOMOŚĆ: '.$sms->text.'';

    	    }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Pobieranie wiadomości przychodzących

```
	try{
    	    $serwersms = new \SMS;

    	    // Get recived messages
    	    $result = $serwersms->messages->recived('ndi');

    	    foreach($result->items as $sms){

    	        echo 'ID: '.$sms->id.'';
    	        echo 'TYP: '.$sms->type.'';
    	        echo 'NUMER: '.$sms->phone.'';
    	        echo 'DATA: '.$sms->recived.'';
    	        echo 'CZARNA LISTA: '.$sms->blacklist.'';
    	        echo 'WIADOMOŚĆ: '.$sms->text.'';

    	    }

	} catch(Exception $e){
	    echo 'ERROR: '.$e->getMessage();
	}
```

Wymagania
---------

[](#wymagania)

php &gt;=7.\*

Laravel = 5.\*

Dokumentacja
------------

[](#dokumentacja)

Konsola API

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32664241?v=4)[zgil](/maintainers/zgil)[@zgil](https://github.com/zgil)

---

Top Contributors

[![SerwerSMSpl](https://avatars.githubusercontent.com/u/7964146?v=4)](https://github.com/SerwerSMSpl "SerwerSMSpl (7 commits)")

### Embed Badge

![Health badge](/badges/serwer-sms/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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