2017 © Pedro Peláez
 

library laravel-txtlocal

Library to use the TxtLocal online messaging service with Laravel 4

image

opb/laravel-txtlocal

Library to use the TxtLocal online messaging service with Laravel 4

  • Sunday, May 4, 2014
  • by opb
  • Repository
  • 3 Watchers
  • 2 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel 4 Txtlocal package

Version 1.0 update - May 2014

As of May 2014, this package has been upgraded, as Txtlocal have altered the way their API works. Major amendments:, (*1)

  • Making use of Guzzle 4 as opposed to cURL directly
  • Removed functionality to process received text messages, as this is super simple to do in Laravel anyway, and this function brought nothing to the party.
  • Better in-line documentation.

Having said all that, Txtlocal do provide their own PHP library, though it's not on composer. I may look into producing a straight PHP version (as opposed to Laravel-specific) which makes more use of the functionality that Txtlocal expose through their API. Currently we're only doing send SMS and getting the account balance., (*2)

Any queries, please get in touch., (*3)

To do:, (*4)

  • Add some tests for Travis

About

TxtLocal is a UK based service providing incoming and outgoing SMS services. This library aims to provide access to some of these functions within the Laravel PHP framework, as well as serving as package development practice for myself!, (*5)

Currently provides the following functions:, (*6)

  1. HTTP POST endpoint for incoming TxtLocal messagebox. (Txtlocal service which allows an SMS to be received by them and the details POSTed to a URL specified by you)
  2. Send SMS function through TxtLocal API using cURL
  3. Check the balance of SMS/MMS credits left on the account

Installation

Installation via composer..., (*7)

Add opb/laravel-txtlocal to your composer requirements:, (*8)

"require": {
    "opb/laravel-txtlocal": "~1"
}

Now run composer update, (*9)

Once the package is installed, open your app/config/app.php configuration file and locate the providers key. Add the following line to the end:, (*10)

'Opb\LaravelTxtlocal\LaravelTxtlocalServiceProvider',

Next, locate the aliases key and add the following line:, (*11)

'LaravelTxtlocal' => 'Opb\LaravelTxtlocal\Facades\LaravelTxtlocal',

Finally, publish the default configuration (it will end up in app/config/packages/opb/laravel-txtlocal/config.php):, (*12)

$ php artisan config:publish opb/laravel-txtlocal

Usage

  1. Send an SMS to one or more numbers. See the package config file to set up API access., (*13)

    // test route to demo SMS sending
    Route::get('send', function()
    {
        $result = LaravelTxtlocal::send(array('447712345678'), 'This is a test message', 'SenderName');
        return $result;
    }
    
  2. Check your balance of SMS and/or MMS credits, (*14)

    // test route to get the account balance
    Route::get('checkbalance', function()
    {
        $result = LaravelTxtlocal::balance();
        return $result;
    }
    

The Versions

04/05 2014

dev-master

9999999-dev

Library to use the TxtLocal online messaging service with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel txtlocal

04/05 2014

1.0.1

1.0.1.0

Library to use the TxtLocal online messaging service with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel txtlocal

04/05 2014

1.0.0

1.0.0.0

Library to use the TxtLocal online messaging service with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel txtlocal

03/09 2013

v0.2

0.2.0.0

Library to use the TxtLocal online messaging service with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel txtlocal

02/09 2013

v0.1

0.1.0.0

Library to use the TxtLocal online messaging service with Laravel 4

  Sources   Download

MIT

The Requires

 

laravel txtlocal