lawrence615 / atgate
This package interacts with the Africa's Taking API using their own PHP SDK.
Installs: 52
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/lawrence615/atgate
This package is not auto-updated.
Last update: 2025-10-12 07:13:37 UTC
README
A simple Laravel package for making it easier to use the official Africa's Talking PHP gateway in your Laravel application.
Requirements
Quick Installation
Install the Package Via Composer:
$ composer require "lawrence615/atgate:dev-master"
Add the Service Provider to your config/app.php
file:
'providers' => [ ... Mobidev\ATGate\ATGateServiceProvider::class, ... ]
Add the Facade to your config/app.php
file:
'aliases' => [ ... 'AfricaTGate' => Mobidev\ATGate\Facades\AfricaTGate::class, ... ]
Publish configuration and assets
$ php artisan vendor:publish
Configuration
The last step of installation, $ php artisan vendor:publish
, creates a config file (atgate.php) in the config directory.
Update AT credentials inside atgate.php
Update both username and api_key inside config/atgate.php.
You can generate the API Key here. You will need to create an account first, username will be the one you create an account with.
Usage in Applications
Import/use the facade in your controller
use AfricaTGate;
- Default
$response = AfricaTGate::sendSMS("0720XXXXXX", "Testing. Test SMS.");
- With Sender Id
$response = AfricaTGate::from('Sender_Id')->sendSMS("0720XXXXXX", "Testing. Test SMS.");