Best laravel framework open-source packages.

SimpleSMS

Laravel Package that integrates with PSWinComs XML API
Updated 2 years ago

SimpleSMS

Latest Version on Packagist Total Downloads Tests StyleCI

My first Laravel Package, uses Laravel's Http client to interact with PSWin.com's Simple HTTP API.

It offers the option to store messages in a database table, and also ability to encrypt/decrypt the message, for added security.

Installation

Via Composer

$ composer require nerdbrygg/simplesms

Configure these settings in your .env

SIMPLESMS_SOURCE=
SIMPLESMS_USERNAME=
SIMPLESMS_PASSWORD=

Usage

By default the only middleware applied to the route is web. To secure this, you'd need to overwrite the route:

Route::middleware(['auth'])->group(function () {
    Route::post('sms/send', ['\Nerdbrygg\SimpleSMS\Controllers\SmsController', 'store'])->name('sms.store');
});
SimpleSMS::create(['message' => 'Hello World!', 'destination' => 'numbers [delimiters: ,;|.]', 'source' => 'Optional'])->send();

Parameters

Parameter Required Default Information
message Yes None 804 characters max
destination Yes None Separated by ,;
source No SIMPLESMS_SOURCE Number or text

Components

I've created a couple of simple bootstrap-themed components to get you up and running faster.

Form

<x-simplesms-form title="Some Title (optional)" :source="true (default: true)"></x-simplesms-form>

Will render a basic form for sending an sms.

Use :source="false" to stop source-field from rendering.

Messages

<x-simplesms-messages title="Some Title (optional)"></x-simplesms-messages>

Will render a basic display of all sent messages.

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

Tags xml