dasundev / laravel-textit
Laravel package for Textit SMS Gateway in Sri Lanka
Fund package maintenance!
Ko Fi
Requires
- php: ^7.2.5|^8.0
- guzzlehttp/guzzle: ^7.4
- laravel/framework: *
Requires (Dev)
- phpunit/phpunit: ^9.5
README
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
- You can install this package via composer:
composer require dasundev/laravel-textit
- 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.