64robots / laravelthinq
:description
v0.0.8
2021-10-12 10:14 UTC
Requires
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2024-11-12 17:32:38 UTC
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require 64robots/laravelthinq
Usage
php artisan vendor:publish --provider="R64\LaravelThinq\LaravelThinqServiceProvider"
Add this to .env
THINQ_ACCOUNT_ID=Your thinq account id
THINQ_API_KEY=Your thinq api key
Use as notification
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use R64\LaravelThinq\ThinqChannel; use R64\LaravelThinq\ThinqMessage; class TestThinq extends Notification { use Queueable; public $silent = true; //if silent true, the service does not throw error /** * Create a new notification instance. * * @return void */ public function __construct() { // } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [ThinqChannel::class]; } public function toThinq($notifiable) { return new ThinqMessage('Send test sms', '122233333', '133333333'); } }
Use standalone
$message = new ThinqMessage('Send test sms', '122233333', '133333333'); new Thinq() ->setMessage($message) ->sendSms() //throws error ->sendSilentSms() //does not throw error
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 kliment.lambevski@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.