Nuwira / smsgw by matriphe

Nuwira SMS gateway client library for Laravel 5.x
333
0
7
Package Data
Maintainer Username: matriphe
Maintainer Contact: zam@nuwira.co.id (Muhammad Zamroni)
Package Create Date: 2015-12-30
Package Last Update: 2020-05-19
Language: PHP
License: Unknown
Last Refreshed: 2024-04-15 15:01:23
Package Statistics
Total Downloads: 333
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 0
Total Watchers: 7
Total Forks: 0
Total Open Issues: 2

Installation

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);