Download the PHP package thinkstudeo/laravel-textlocal without Composer
On this page you can find all versions of the php package thinkstudeo/laravel-textlocal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thinkstudeo/laravel-textlocal
More information about thinkstudeo/laravel-textlocal
Files in thinkstudeo/laravel-textlocal
Package laravel-textlocal
Short Description A Laravel wrapper for Textlocal API
License MIT
Homepage https://github.com/thinkstudeo/laravel-textlocal
Informations about the package laravel-textlocal
Laravel Wrapper for Textlocal API.
A convenience wrapper for the textlocal.in api requests for transactional as well as promotional accounts. The reseller account specific api are not available at this point in time.
Sms messaging can be used for transactional messages like:
- Sending OTP for Two Factor Authentication
- Confirmation of payment received or order placed etc
Transactional messages need to be sent through at any time without any DND (Do Not Disturb) restrictions. For this one needs to register a Transactional Account with Textlocal or request for conversion of the default account to a Transactional Account.
On the other hand Sms messaging may also be used for promotional activities like:
- Announcing product launch or discount sale
- Announcing an award receid=ved by the company or product
- Sending coupon code etc
Promotional messages need to adhere to the DND (Do Not Disturb) restrictions. The default signup at Textlocal creates a Promotional Account by default.
Contents
- Laravel Wrapper for Textlocal API.
- Contents
- Installation
- Usage
- Transactional Account
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
Config
Package facilitates using Transactional as well as Promotional Account with Textlocal at the same time.
Add the following to your config/services.php
file
Don't forget to add the keys to your .env
file
If you have just one - i.e. Promotional Account or Transactional Account - make sure to enter the API key accordingly.
For example, for just a Textlocal Promotional Account, declare TEXTLOCAL_PROMOTIONAL_KEY=api_key_for_your_promotional_account
.
Usage
There are two facades included with the package:
Sms
for sending messagesAccount
for interacting with the Textlocal Account
For differentiating the api calls with respect to account type use transactional()
or promotional()
to set the account for the api call.
Messaging - Transactional Account
You must have a transactional account with Textlocal inorder to send transactional sms without DND restriction 24x7. Also don't forget to get your templates for the transactional messages approved by Textlocal. Finally, you must generate an API KEY from your Textlocal dashboard
Then you can use the facade like
To send to a single user
To send to multiple users at once
OR, you can also provide the numbers as an array
And if you want to schedule a message to be sent at a specified time in future you can provide a datetime string in any of the formats supported by Carbon or you may also provide a unix timestamp.
To cancel a scheduled message
Messaging - Promotional Account
To send to a single user
To send to multiple users at once
OR, you can also provide the numbers as an array
And if you want to schedule a message to be sent at a specified time in future you can provide a datetime string in any of the formats supported by Carbon or you may also provide a unix timestamp.
To cancel a scheduled message
Message Status
To get the details of status of a message sent
Received Messages from Inbox
To retrieve the received messages from specific inbox
Templates in Account
To fetch all the templates associated with the account
Sender names
To fetch all the approved sender names from your account
Account Balance
To get the current account balance (credits remaining)
Check the availability of keyword
Check if a Contact Group exists
Create a New Contact Group
Get a list of all Groups
Delete a Contact Group
List of all Members of a Contact Group
Add numbers to an existing contact group
Add Contacts to an existing group
Remove a contact from the group
Get a list of all who have opted out
History
Surveys
To fetch a list of all active surveys
To get the details of a specific survey
To get the results of a specific survey
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Please note that all test are integration tests meaning they will actually hit the textlocal api and consume the credits.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-textlocal with dependencies
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0
guzzlehttp/guzzle Version ^5.0|^6.0