bhavinjr/laravel-alots

Laravel SMS APIs for alots

1.3 2021-04-15 04:49 UTC

This package is auto-updated.

Last update: 2024-12-15 12:54:57 UTC


README

A simple alots sms gateway implementation for Laravel 5.|6.|7.*

For more information please visit:- https://www.alots.in/

Latest Stable Version Total Downloads License

Installation

First, you'll need to install the package via Composer:

$ composer require bhavinjr/laravel-alots

If you are don't use using Laravel 5.5.* Then, update config/app.php by adding an entry for the service provider.

'providers' => [
    // ...
    Bhavinjr\Alots\Providers\AlotsServiceProvider::class,
];

'aliases' => [
    //...
    "Alots": "Bhavinjr\Alots\Facades\Alots",
];

In command line paste this command:

php artisan config:cache

In command line again, publish the default configuration file:

php artisan vendor:publish --provider="Bhavinjr\Alots\Providers\AlotsServiceProvider"

In command line paste this command:

php artisan migrate

Configuration

Configuration was designed to be as flexible. global configuration can be set in the config/alots.php file.

return [
    'table_names' => [
        'messages'    => 'alots_messages',
    ],
];

after update config/alots.php file.

php artisan config:cache

Usage

The package gives you the following methods to use:

Send sms is really simple

you need specify mobile_number and sms_text respectively all parameter are compulsory

Alots::simpleSms()

Alots::simpleSms('9876543210', 'test sms');

Alots::unicodeSms()

Send unicode sms

Alots::unicodeSms('9876543210', 'test sms');

Alots::scheduleSms()

You can schedule sms

Alots::scheduleSms('9876543210', 'test sms', '01012020-1010AM');

Alots::groupSms()

Send sms using group

you need specify group_id and sms_text respectively all parameter are compulsory

Alots::groupSms('123', 'test sms');

Alots::getDeliveryReport()

To check sms delivery status.

you need specify message_id

Alots::getDeliveryReport('123');

Alots::checkCredit()

To check available sms/credit limit.

Alots::checkCredit();