Skip to content

vickzkater/onewaysms-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

One Way SMS Gateway API - Laravel Library (OnewaySms)

One Way SMS Gateway API - Laravel Library (OnewaySms)

One Way SMS Gateway API - Laravel Library Worked on API Version 1.2

Packages Used (Outside of Laravel)

Feature

  • Send SMS (Short Message Service)

How-to-Use

Set One Way SMS Gateway auth credentials in .env file

...
ONEWAYSMS_API=xxx
ONEWAYSMS_AUTH_USER=xxx
ONEWAYSMS_AUTH_PASS=xxx
...

Copy OnewaySms.php to your Laravel project - for sample copy then paste in app/Libraries

In your Controller file, please include the OnewaySms library

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

// USE LIBRARIES
use App\Libraries\OnewaySms;

class XxxController extends Controller
{
    ....

How to call the function send SMS using OnewaySms library

...
// SET THE PARAMETERS
$mobile = $request->input('mobile_phone');
$message = $request->input('message');
$debug = false;

$result = OnewaySms::send($mobile, $message, $debug);

return $result; // Boolean
...

If you want to debug the function, set $debug = true; then the response of the function will be an array containing the response status, the response code, and the response message from OnewaySms Gateway API

// result sample:
array:3 [▼
    "status" => false
    "code" => -100
    "message" => "apipassname or apipassword is invalid"
]

For sample, please check DevController.php

Contributing

Thank you for considering contributing to the OnewaySms.

Bugs, Improvements & Security Vulnerabilities

If you discover a bug or security vulnerability within OnewaySms, please send an email to Vicky Budiman at vicky@kiniditech.com. All requests will be addressed promptly.

Issues

If you come across any issue/bug please report them here.

License

OnewaySms is open-sourced software built by KINIDI Tech and contributors and licensed under the MIT license.

Credits

Brought to you by

KINDI Tech

KINIDI Tech

About

OnewaySms Gateway API - Laravel Library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages