64robots/laravelthinq

:description

Maintainers

👁 64robots

Package info

github.com/64robots/laravel-thinq

Homepage

pkg:composer/64robots/laravelthinq

Statistics

Installs: 602

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.0.8 2021-10-12 10:14 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT df5d3370a654c60a0d88566a5320777418eb82ce

laravelLaravelThinq


README

👁 Latest Version on Packagist
👁 Total Downloads
👁 Build Status
👁 StyleCI

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.