dasundev/laravel-textit

Laravel package for Textit SMS Gateway in Sri Lanka

Fund package maintenance!
Ko Fi

v2.3 2023-08-05 17:28 UTC

This package is auto-updated.

Last update: 2024-10-20 13:25:32 UTC


README

Textit Logo

License Total Downloads

Laravel Textit

Laravel Textit will help you to integrate the Textit SMS gateway very easily on your laravel application.

This package has been developed for https://textit.biz

Therefore, you must have an active textit account with sufficient balance to send SMS.

Installation

  1. You can install this package via composer:
composer require dasundev/laravel-textit
  1. You can publish the config file with:
php artisan vendor:publish --provider="Dasundev\LaravelTextit\TextitServiceProvider" --tag="config"

ENV Keys

  • Add following environment keys to your .env file. then replace with your Account ID & Password.
TEXTIT_ACCOUNT_ID=94XXXXXXXXX
TEXTIT_ACCOUNT_PASSWORD=1234
  • Optional environment keys(currently not available).
TEXTIT_CUSTOM_SENDER_ID=Textit
TEXTIT_ECO=Y
TEXTIT_REPLY_NUMBER=07XXXXXXXX
TEXTIT_REPLY_URL=https://your-domain.com/textit/replies

Usage

  • Send message to a user.
Textit::sms('07XXXXXXXX', 'Your order has been delivered!'); // using facade
textit()->sms('07XXXXXXXX', 'Your order has been delivered!'); // using helper function
  • Check your textit account balance.
$balance = Textit::balance(); // using facade
$balance = textit()->balance(); // using helper function

License

Copyright © Dasun Tharanga

Laravel Textit is open-sourced software licensed under the MIT license.