expertsystemsau/transmitsms-laravel-client

Laravel notification channel and integration for the TransmitSMS API

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/expertsystemsau/transmitsms-laravel-client

v1.3.0 2025-12-09 11:21 UTC

This package is auto-updated.

Last update: 2025-12-09 11:34:17 UTC


README

Latest Version on Packagist Total Downloads License

Laravel notification channel and integration for the TransmitSMS API.

Installation

composer require expertsystemsau/transmitsms-laravel-client

Publish the configuration file:

php artisan vendor:publish --tag="transmitsms-config"

Configuration

Add your credentials to your .env file:

TRANSMITSMS_API_KEY=your-api-key
TRANSMITSMS_API_SECRET=your-api-secret
TRANSMITSMS_FROM=YourSenderID

Usage

Facade

use ExpertSystems\TransmitSms\Laravel\Facades\TransmitSms;

// Send an SMS
TransmitSms::sendSms('+61400000000', 'Hello from Laravel!');

// Get account balance
$balance = TransmitSms::getBalance();

Notifications

Create a notification that uses the TransmitSMS channel:

use Illuminate\Notifications\Notification;
use ExpertSystems\TransmitSms\Laravel\Notifications\TransmitSmsMessage;

class OrderShipped extends Notification
{
    public function via($notifiable): array
    {
        return ['transmitsms'];
    }

    public function toTransmitSms($notifiable): TransmitSmsMessage
    {
        return (new TransmitSmsMessage())
            ->content('Your order has been shipped!')
            ->from('MyStore');
    }
}

Add the routeNotificationForTransmitsms method to your notifiable model:

class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForTransmitsms($notification): ?string
    {
        return $this->phone_number;
    }
}

Then send notifications:

$user->notify(new OrderShipped());

License

The MIT License (MIT). Please see License File for more information.