| Package Data | |
|---|---|
| Maintainer Username: | franzose |
| Maintainer Contact: | iwanow.jan@gmail.com (Jan Iwanow) |
| Package Create Date: | 2016-06-08 |
| Package Last Update: | 2024-05-24 |
| Home Page: | |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-11-06 15:16:11 |
| Package Statistics | |
|---|---|
| Total Downloads: | 40,396 |
| Monthly Downloads: | 309 |
| Daily Downloads: | 4 |
| Total Stars: | 39 |
| Total Watchers: | 3 |
| Total Forks: | 32 |
| Total Open Issues: | 2 |
This package is a tiny wrapper for the onlinecity/php-smpp library. It provides a basic SMPP interface and implementation for the Laravel 5.2 framework.
You can install Laravel SMPP using Composer command:
$ composer require franzose/laravel-smpp
Then you need to add LaravelSmpp\LaravelSmppServiceProvider::class to your providers array in the config/app.php
and copy default configuration by invoking $ php artisan vendor:publish command.
You can use the service pretty straightforward and inject dependency in your controller:
<?php
namespace App\Http\Controllers;
class SmsController extends Controller
{
public function send(SmppServiceInterface $smpp)
{
// One number
$this->smpp->sendOne(1234567890, 'Hi, this SMS was send via SMPP protocol');
// Multiple numbers
$this->smpp->sendBulk([1234567890, 0987654321], 'Hi!');
}
}
However it is better to abstract your SMS sending service from the SMPP implementation by defining a SMPP-compatible service interface.