nerdbrygg / simplesms
Integrates PSWinCom's Simple SMS API with Laravel.
Requires
- illuminate/support: ~5|~6|~7
Requires (Dev)
- guzzlehttp/guzzle: ^7.0
- mockery/mockery: ^1.1
- orchestra/testbench: ~3|~4|~5
- phpunit/phpunit: ^8.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-10-29 06:00:05 UTC
README
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
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.