2017-25 © Pedro Peláez
 

laravel sms

Africa is talking sms api for East and Central Africa

image

ftg/sms

Africa is talking sms api for East and Central Africa

  • Wednesday, August 30, 2017
  • by FluidTechGlobal
  • Repository
  • 2 Watchers
  • 2 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel - Africa is Talking Sms

Using Laravel Framework and Africa Is Talking Api, SMS can now be sent in Africa with ease. Follow the steps below and use the Package, (*1)

Installation

Run composer require ftg/sms:dev-master at the root of your Laravel Project., (*2)

Africa is Talking Account Creation

You will need an account in Africa is Talking. By default a new account has 10 free sms for test purposes. Visit Africa is Talking and create an account or login if you have one., (*3)

Api Creation

Create an Api Key that will be used to send the messages, (*4)

Configuration

Add the following line to your providers in the App/Config/app.php file;, (*5)

 Ftg\Sms\SmsServiceProvider::class,

Add the following line to your aliases in the App/Config/app.php file;, (*6)

'SMS' => Ftg\Sms\Facades\Sms::class,

Add the following lines to your .env file for the Package to pick your africa is talking username and api key. Complete them with the relevant credentials, (*7)

Africa_Is_Talking_Username=
Africa_Is_Talking_API_KEY=
Africa_Is_Talking_ID=

Usage

In your controller include the following line at the top;, (*8)

use Ftg\Sms\Facades\Sms;

In the function send the message as follows;, (*9)

/**
 * Sending of Sms
 * Not that numbers have to begin with 254 for Kenya
 **/
public function test()
{
        $mobile = "254...";
        $message = "Your Message goes here";
        Sms::send_sms($mobile,$message);
        return "message sent";
}

License

The Laravel framework is open-sourced software licensed under the MIT license., (*10)

The Versions

30/08 2017

dev-master

9999999-dev

Africa is talking sms api for East and Central Africa

  Sources   Download

MIT

The Requires

  • php >=5.4.0