LaravelPackages.net
Acme Inc.
Toggle sidebar
vicenterusso/laravel-facilitamovel-channel

Facilita Movel notification channel for Laravel

17
0
v1.0.0
About vicenterusso/laravel-facilitamovel-channel

vicenterusso/laravel-facilitamovel-channel is a Laravel package for facilita movel notification channel for laravel. It currently has 0 GitHub stars and 17 downloads on Packagist (latest version v1.0.0). Install it with composer require vicenterusso/laravel-facilitamovel-channel. Discover more Laravel packages by vicenterusso or browse all Laravel packages to compare alternatives.

Last updated

Laravel Facilita Movel Notification Channel

Latest Version on Packagist Software License

This package makes it easy to send notifications using FacilitaMovel with Laravel 5.5+, 6.x, 7.x and 8.x

Facilita Movel channel notification for Laravel. Simple send support only

Contents

Installation

You can install the package via composer:

$ composer require vicenterusso/laravel-facilitamovel-channel

Setting up the FacilitaMovel service

Configure your credentials:

// config/services.php
...
'facilitamovel' => [
    'login'    => env('FACILITA_MOVEL_LOGIN', 'YOUR ACCOUNT'),
    'password' => env('FACILITA_MOVEL_PASSWORD', 'YOUR PASSWORD')
],
...

Usage

You can now use the channel in your via() method inside the Notification class.

use NotificationChannels\FacilitaMovel\FacilitaMovelChannel;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
    public function via($notifiable)
    {
        return [FacilitaMovelChannel::class];
    }

    public function toFacilitamovel($notifiable)
    {
        return FacilitaMovel::create()
            ->to($notifiable->phone) // your user phone
            ->content('Your invoice has been paid');
    }
}

Routing a message

...
/**
 * Route notifications for the FacilitaMovel channel.
 *
 * @return int
 */
public function routeNotificationForFacilitamovel()
{
    return $this->phone;
}
...

Available Message methods

  • to($phone): (integer) Recipient's phone.
  • content('message'): (string) SMS message.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments