Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dasundev/laravel-textit

Laravel package for Textit SMS Gateway in Sri Lanka
https://github.com/dasundev/laravel-textit

hacktoberfest laravel

Last synced: 2 months ago
JSON representation

Laravel package for Textit SMS Gateway in Sri Lanka

Awesome Lists containing this project

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](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:
```bash
composer require dasundev/laravel-textit
```
2. You can publish the config file with:
```bash
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.

```dotenv
TEXTIT_ACCOUNT_ID=94XXXXXXXXX
TEXTIT_ACCOUNT_PASSWORD=1234
```
* Optional environment keys(currently not available).

```dotenv
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.
```php
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.
```php
$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.