dev-master
9999999-devProvides support for SMS providers using the TransmitSMS backend and pacakges the existing PHP class file as a composer package
The Requires
- php >=5.4.0
- illuminate/support 4.2.*
by Ashley Breeden
Provides support for SMS providers using the TransmitSMS backend and pacakges the existing PHP class file as a composer package
Provides an implementation for the TransmitSMS-API as used by BurstSMS (burstsms.com.au), (*1)
Original class was developed by BurstSMS and packaged by abreeden for use in Laravel 4. This package have been update for Laravel 5., (*2)
Once you have installed this package, you will need to add the service provider to the providers
array in app.php
config file:, (*3)
Abreeden\TransmitsmsApi\TransmitsmsApiServiceProvider
or, (*4)
Abreeden\TransmitsmsApi\TransmitsmsApiServiceProvider::class
Next, you may want to add the TransmitSMS facade. To do that, you will need to add under the aliases
array, also in the app.php
config file:, (*5)
'TransmitSMS' => Abreeden\TransmitsmsApi\Facades\TransmitsmsApiFacade
or, (*6)
'TransmitSMS' => Abreeden\TransmitsmsApi\Facades\TransmitsmsApiFacade::class
Finally, you will need to publish the config file using the following command:, (*7)
$ php artisan vendor:publish --provider="Abreeden\TransmitsmsApi\TransmitsmsApiServiceProvider"
Remember to set your API and secret keys in the config file or .env file!, (*8)
To send a message you will require an account with a provider using the TransmitSMS API such as BurstSMS. Use the following syntax to initialise and send a message in Laravel 5., (*9)
Without facade:, (*10)
$sms = new \Abreeden\TransmitsmsApi\TransmitsmsApi("API_KEY", "SECRET"); $result = $sms->sendSms("Message goes here", "Destination Number", "From");
With facade:, (*11)
$result = \TransmitSMS::sendSms("Message goes here", "Destination Number", "From");
Provides support for SMS providers using the TransmitSMS backend and pacakges the existing PHP class file as a composer package