LaravelPackages.net
Acme Inc.
Toggle sidebar
magojr/laravel-smpp

SMS sending via SMPP protocol for Laravel framework.

15
0
v1.1.2
About magojr/laravel-smpp

magojr/laravel-smpp is a Laravel package for sms sending via smpp protocol for laravel framework.. It currently has 0 GitHub stars and 15 downloads on Packagist (latest version v1.1.2). Install it with composer require magojr/laravel-smpp. Discover more Laravel packages by magojr or browse all Laravel packages to compare alternatives.

Last updated

Laravel SMPP

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.

Installation

You can install Laravel SMPP using Composer command:

$ composer require magojr/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.

Usage

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.

Star History Chart