Giter Site home page Giter Site logo

laravel-smpp's Introduction

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 framework.

Installation

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.

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.

laravel-smpp's People

Contributors

atefr avatar barnoma-soz avatar franzose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-smpp's Issues

SmppServiceInterface not working

Hello Friends,

When i am calling (SmppServiceInterface $smpp) in my controller it's not working.

Can you please let me know how we can use in my controller ?

Also i am using laravel version 5.8.

Thanks

installation error on laravel 5.2.41

[InvalidArgumentException]
Could not find package franzose/laravel-smpp at any version for your minimum-stability (stable). Check the package
spelling or your minimum-stability

can you check this

Laravel 5.4 Conflict with requirements and minimum stability

Hello

I've tried to install you package but where is an issue with installation.

Problem 1
    - Installation request for franzose/laravel-smpp ^1.0 -> satisfiable by franzose/laravel-smpp[v1.0].
    - franzose/laravel-smpp v1.0 requires php-smpp/php-smpp dev-master -> satisfiable by php-smpp/php-smpp[dev-master] but these conflict with your requirements or minimum-stability.

As I understand you composer.json is referencing bad version, because php-smpp, do not have dev-master.
For now I faked composer.json, and added in require block

"php-smpp/php-smpp": "dev-master as 1.2"

But it would be nice if dependencies would be fixed :)

Error adding the library

Running on two different serve environment brings the same error
Problem 1
- Installation request for franzose/laravel-smpp ^1.0 -> satisfiable by franzose/laravel-smpp[v1.0].
- franzose/laravel-smpp v1.0 requires php-smpp/php-smpp dev-master -> satisfiable by php-smpp/php-smpp[dev-master] but these conflict with your requirements or minimum-stability

Installation failed, reverting ./composer.json to its original content.

Installation on Laravel 6

I'm trying to use it in Laravell 6.0.4 but dependency illuminate/support ^5.2 is not stisfied from 6.0.4.
It's probably easy as update the version required in the dependency list.

use of ip address

I would like to know if this code uses ip addresses and ports to send sms without going through a provider?

Progress bar

how can we create a progress bar with this package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.