Package Data | |
---|---|
Maintainer Username: | opb |
Maintainer Contact: | olly@opb.me.uk (Olly Butterfield) |
Package Create Date: | 2013-08-28 |
Package Last Update: | 2014-05-03 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:16:41 |
Package Statistics | |
---|---|
Total Downloads: | 35 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 4 |
Total Forks: | 0 |
Total Open Issues: | 0 |
#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:
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.
Any queries, please get in touch.
To do:
###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!
Currently provides the following functions:
###Installation
Installation via composer...
Add opb/laravel-txtlocal
to your composer requirements:
"require": {
"opb/laravel-txtlocal": "~1"
}
Now run composer update
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:
'Opb\LaravelTxtlocal\LaravelTxtlocalServiceProvider',
Next, locate the aliases
key and add the following line:
'LaravelTxtlocal' => 'Opb\LaravelTxtlocal\Facades\LaravelTxtlocal',
Finally, publish the default configuration (it will end up in app/config/packages/opb/laravel-txtlocal/config.php
):
$ php artisan config:publish opb/laravel-txtlocal
###Usage
Send an SMS to one or more numbers. See the package config file to set up API access.
// test route to demo SMS sending
Route::get('send', function()
{
$result = LaravelTxtlocal::send(array('447712345678'), 'This is a test message', 'SenderName');
return $result;
}
Check your balance of SMS and/or MMS credits
// test route to get the account balance
Route::get('checkbalance', function()
{
$result = LaravelTxtlocal::balance();
return $result;
}