LaravelPackages.net
Acme Inc.
Toggle sidebar
nerdbrygg/simplesms

Integrates PSWinCom's Simple SMS API with Laravel.

19
0
0.3.0
About nerdbrygg/simplesms

nerdbrygg/simplesms is a Laravel package for integrates pswincom's simple sms api with laravel.. It currently has 0 GitHub stars and 19 downloads on Packagist (latest version 0.3.0). Install it with composer require nerdbrygg/simplesms. Discover more Laravel packages by nerdbrygg or browse all Laravel packages to compare alternatives.

Last updated

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.

Star History Chart