LaravelPackages.net
Acme Inc.
Toggle sidebar
64robots/laravelthinq

:description

602
1
v0.0.8
About 64robots/laravelthinq

64robots/laravelthinq is a Laravel package for :description. It currently has 1 GitHub stars and 602 downloads on Packagist (latest version v0.0.8). Install it with composer require 64robots/laravelthinq. Discover more Laravel packages by 64robots or browse all Laravel packages to compare alternatives.

Last updated

LaravelThinq

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 [email protected] instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

Comments