https://github.com/coderatio/smartsms
A flexible PHP library for smartsms solutions
https://github.com/coderatio/smartsms
Last synced: 12 months ago
JSON representation
A flexible PHP library for smartsms solutions
- Host: GitHub
- URL: https://github.com/coderatio/smartsms
- Owner: coderatio
- License: mit
- Created: 2018-03-05T19:04:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T14:40:01.000Z (about 8 years ago)
- Last Synced: 2025-06-23T09:07:25.049Z (12 months ago)
- Language: PHP
- Size: 27.3 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Smartsms
A flexible PHP library for smartsms solutions
# Installation
`composer require coderatio/smartsms`
# Usage
```php
require('vendor/autoload.php');
use Coderatio\Smartsms\Smartsms;
$config['token'] = env('SMARTSMS_TOKEN');
// Or
$config['token'] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$sms = Smartsms::init($config)
->to('XXX-XX-XXXX-XXXX')
->from('Coderatio')
->message('I have installed the library.')
->send();
```
# Response
The library returns json and object response type.
```php
$sms->asObject(); //Returns response as object
$sms->response(); //Returns as json.
```
# Todo
1. Send sms from files (txt, pdf, docs, .xls)
2. Test (Phpunit)