Skip to content

tekkenking/swissecho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swissecho Laravel SMS Notification Channel

Swissecho is a Laravel SMS notification channel package that provides a convenient way to send SMS messages through various gateways. This package is designed to be flexible, allowing you to customize the message content, recipient, sender, and gateway.

Installation

To install the Swissecho package, simply require it via Composer:

composer require tekkenking/swissecho

Laravel Version Compatibility

For Laravel 5.5 and above, the package should be automatically discovered. For Laravel versions below 5.5, you may need to add the service provider to your config/app.php file:

'providers' => [
    // ...
    Tekkenking\Swissecho\SwissechoServiceProvider::class,
],

Basic Usage

The following are different ways to use the Swissecho package:

General Usage

    Swissecho::route('sms', function($ms) {
        return $ms->to('XXXXXXXXXXXX, XXXXXXXXXXXX ')
            ->content('Wonders shall never end')
            ->line('Hello world');
            //->gateway('routemobile') //optional
            //->sender('SimbooBiz'); //optional
    })
    ->to('XXXXXXXXXXXX') //optional
    ->sender('Smart') //optional
    ->gateway('termii') //optional
    ->go();

Use Case 1 (SMS)

    swissecho()->route('sms', function($ms) {
        return $ms->to('XXXXXXXXXXXX, XXXXXXXXXXXX ')
            ->content('Wonders shall never end')
            ->line('Hello world');
            //->gateway('routemobile') //optional
            //->sender('SimbooBiz'); //optional
    })
    ->to('XXXXXXXXXXXX') //optional
    ->sender('Smart') //optional
    ->gateway('termii') //optional
    ->go();

Use Case 2

    swissecho()->quick('XXXXXXXXXXXX', "My name is bola");

Use Case 3 (Slack)

    swissecho()->message("Hello world")
    ->to('XXXXXXXXXXXX')
    //->sender('Raimi')
    //->gateway('termii')
    ->route('slack')
    ->go();

Use Case 4 (Vonage)

    swissecho()->gateway('vonage')->quick('XXXXXXXXXXXX', "My name is bola");

Use Case 5 (Termii)

    $sw = swissecho();
    //$sw->mockNotifiable($user);
    $sw->gateway('termii');
    $sw->to = "XXXXXXXXXXXX";
    $sw->sender = "AXIX";
    $sw->message = "The world is a beauty place created by GOD";
    $sw->go();

Feel free to customize the examples based on your specific use case and requirements.

License

This package is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages