Download the PHP package avlima/laravel-sms-mmcenter without Composer
On this page you can find all versions of the php package avlima/laravel-sms-mmcenter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download avlima/laravel-sms-mmcenter
More information about avlima/laravel-sms-mmcenter
Files in avlima/laravel-sms-mmcenter
Package laravel-sms-mmcenter
Short Description MMCenter SMS notification service for Laravel
License MIT
Homepage https://github.com/avlima/laravel-sms-mmcenter
Informations about the package laravel-sms-mmcenter
Integrate SMS MMCenter with Laravel
MMCenter SMS notification service for Laravel.
Star ⭐ repo to show suport 😊
Installation
Install Package
Require this package with composer:
Add Service Provider & Facade
For Laravel 5.5+
Once the package is added, the service provider and facade will be autodiscovered.
For Older versions of Laravel
Add the ServiceProvider to the providers array in config/app.php
:
Add the Facade to the aliases array in config/app.php
:
Publish Config
Once done, publish the config to your config folder using:
Configuration
Add the keys in .env
:
Once the config file is published, open config/sms-mmcenter.php
Usage
Using SmsMMCenter facade
- Basic Usage
SmsMMCenter::sendMessage("TO","MESSAGE");
Use in Notifications
Setting up the Route for Notification
Add the method routeNotificationForSmsMMCenter()
to your Notifiable model:
By default, your User model uses Notifiable.
Setting up Notification
Add
use Avlima\SmsMMCenter\Notifications\SmsMMCenterChannel;
and
use Avlima\SmsMMCenter\Notifications\SmsMMCenterMessage;
to your notification.
You can create a new notification with php artisan make:notification NOTIFICATION_NAME
In the via
function inside your notification, add return [SmsMMCenterChannel::class];
and add a new function toSmsMMCenter($notifiable)
to return the message body and parameters.
Notification example:-
Support
Feel free to post your issues in the issues section.
Credits
Developed by Alberto Lima
License
MIT
All versions of laravel-sms-mmcenter with dependencies
illuminate/notifications Version >=5.3
illuminate/queue Version >=5.3
illuminate/support Version >=5.3
illuminate/http Version >=5.3
guzzlehttp/guzzle Version ^6.3