seven-io / bagisto

Bagisto package for sending SMS via seven

Home Page:https://packagist.org/packages/seven.io/bagisto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adds the functionality to send SMS via sms77.

Prerequisites

Installation

  1. Retrieve the package via composer by running composer require sms/bagisto

  2. Register the package as service provider by appending an entry in config/app.php.

<?php
return [
    // ...
    'providers' => [
        // ...
        Sms77\Bagisto\Providers\Sms77ServiceProvider::class,
    ],
        // ...
];
  1. Execute these commands to clear the cache and migrate the database:
php artisan cache:clear && php artisan migrate

Setup

Before you can start sending SMS you will need to submit your sms77 API key. This can be in two ways:

Configuration via administration panel

  1. Navigate to Dashboard -> Configure -> sms77 in your Bagisto admin panel.
  2. Enter your API Key and submit by clicking on Save.

Setting an environment variable

  1. Define your sms77 API key in the environment by adding an entry to the .env file in the root of your project.
SMS77_API_KEY=YourSuperSecretApiKeyFromSms77
  1. Add the following lines to config/services.php:
return [
    // ...
    'sms77' => [
        'api_key' => env('SMS77_API_KEY'), // must match the key from .env file added in the previous step
    ],
];

Clear the cache and cache the configuration by executing php artisan cache:clear && php artisan config:cache.

Please note: Setting the API key via configuration takes precedence over defining it as an environment variable. Also, the value from the environment won't get shown in the configuration form due to technical limitations.

Usage

Send SMS to Customer

Go to Customers and click on the sms77 icon in the actions column.

Send SMS to Customer Group

Go to Groups and click on the sms77 icon in the actions column.

You can use property placeholders which resolve to the person's property as long as it is defined, e.g. {{first_name}} {{last_name}} resolves to the person's first and last name.

Support

Need help? Feel free to contact us.

MIT

About

Bagisto package for sending SMS via seven

https://packagist.org/packages/seven.io/bagisto

License:MIT License


Languages

Language:PHP 73.5%Language:Blade 21.3%Language:JavaScript 3.2%Language:SCSS 1.9%