nuwira/smsgw

There is no license information available for the latest version (4.2.1) of this package.

Nuwira SMS API client library

4.2.1 2020-04-07 00:21 UTC

This package is auto-updated.

Last update: 2024-10-20 03:06:59 UTC


README

composer require nuwira/smsgw

Version 3.0 is for old API. For new API, use version 4.0 (latest).

Version 2.0 has been deprecated. Please don't use the version 2.0 or below.

Configuration

Laravel version >= 5.5

Nothing to do. This package use package auto-discovery feature.

Laravel version < 5.5

Open config/app.php add these lines:

'providers' => [
	Nuwira\Smsgw\SmsServiceProvider::class,
];

'aliases' => [
	'SMS' => Nuwira\Smsgw\SmsFacade::class,
];

Publish Config

php artisan vendor:publish

Open your .env file or config/sms.php and add your URL and API Key.

Usage

Auth

SMS::auth($username, $password);

Profile

SMS::profile();

Send Bulk SMS

$bulk = [
	[
		'to' => $number,
		'message' => $message,
	]
];
SMS::bulk($bulk);

Send Single SMS

SMS::send($to_number, $message);

Check Credit

SMS::credit();

Get Received (Inbox)

SMS::received($startDate, $endDate, $search, $page);

Get Detailed Received SMS (Inbox)

SMS::receivedId($id);

Get Sent (Outbox)

SMS::sent($startDate, $endDate, $status, $search, $page);

Get Detailed Sent SMS (Outbox)

SMS::sentId($id);