The ibtdi/hisms
package provides a fluent interface to send sms using HISMS in your php application.
You can install the package via composer:
composer require ibtdi/hisms
- After install package run the installation command
php artisan hisms:install
or
vendor:publish --provider="Ibtdi\HiSms\HISmsServiceProvider" --tag="config"
- Set your env variables - take a look at
config/hisms.php
- Send first sms:
HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send();
and that's it...
- other ways you would like to get some response it can be done like so:
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetMessage();
- there are other functions to get infos individual not chaining
andGetStatus
andGetCode
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetStatus();
$response=HiSms::to(['9665 xxx xxxx','9665 xxx xxxx'])
->message('hello world')
->send()
->andGetCode();
andGetStatus : bool
andGetMessage : string
andGetCode : int
Please see CHANGELOG for more information what has changed recently.
phpunit
Please see CONTRIBUTING for details.
If you discover any security related issues, please email mohamednasrali00@gmail.be instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.