Download the PHP package laravel-notification-channels/gammu without Composer
On this page you can find all versions of the php package laravel-notification-channels/gammu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-notification-channels/gammu
More information about laravel-notification-channels/gammu
Files in laravel-notification-channels/gammu
Package gammu
Short Description Gammu Notifications Driver
License MIT
Homepage https://github.com/laravel-notification-channels/gammu
Informations about the package gammu
Gammu Notifications Channel for Laravel 5.3
~This package makes it easy to send SMS notifications using Gammu SMSD with Laravel 5.3.~
Channel Deprecated
Please see this issue for more infomation.
This channel was deprecated in Oct 2019 due to lack of a maintainer.
If you'd like to take over maintaince, feel free to open an PR to bring the package up to date & we can transfer the package.
Contents
- Requirements
- Installation
- Setting Up Gammu Service
- Using Native Gammu SMSD Method
- Using Gammu Api
- Setting Up Gammu Service
- Usage
- Routing a message
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Requirements
Gammu
Make sure your Gammu SMSD has properly configured and able to send SMS. For more info to install and configure Gammu SMSD, read the Gammu SMSD documentation.
Gammu Api
This is optional if you want to use Gammu Api. Make sure Gammu Api has properly configured and able to send SMS using this API.
Under the hood, Gammu Api is using gammu sendsms
command line.
Installation
You can install the package via composer:
You must install the service provider:
Setting Up Gammu Service
There are two methods to send SMS using Gammu. First method is using native Gammu SMSD method, by inserting data directly to Gammu SMSD database. The second method is using Gammu Api.
Using Native Gammu SMSD Method
Make sure your Gammu SMSD has properly configured and able to send SMS by inserting data to outbox
table. The Gammu SMSD and database can be installed in the same machine or in different machine.
Add this settings in config/services.php
to send SMS using native Gammu method.
Set the database setting to point Gammu SMSD database in config/database.php
by adding this settings below.
The sender is the default sender name defined in phones
table. If it's not set, it will automatically select the first data from phones
table. This setting is useful if you have multiple sender.
Using Gammu Api
Make sure your Gammu Api has properly configured and able to send SMS via it's API. The Gammu Api can be installed in the same machine or in different machine.
Add these settings in config/services.php
to send SMS.
Using Gammu Api with Redis
Make sure, that your Redis server is running and it's able to communicate with your application and gammu api. You are also able to specify for using multiple Gammu Api's or have it on a non-default channel.
Usage
You can now use the channel in your via()
method inside the Notification class.
If you have multiple senders, you can set the sender by passing sender
method. If sender is not set, it will use one of sender from phones
table. This method is only available if you're using native Gammu SMSD method.
Routing a message
You can either send the notification by providing with the phone number of the recipient to the to($phoneNumber)
method like shown in the above example or add a routeNotificationForGammu()
method in your notifiable model.
Available methods
to($phoneNumber)
:(string)
Receiver phone number. Using international phone number (+62XXXXXXXXXX) format is highly suggested.content($message)
:(string)
The SMS content. If content length is more than 160 characters, it will be sent as long SMS automatically.sender($sender)
:(string)
Phone sender ID set in Gammuphones
table. This method is only available if you're using native Gammu method.callback($callbackText)
:(string)
Callback text for Gammu Api gives you function to pass text and when the Api will send your message it will be sent back to your callback url specified in your Gammu Api. Please setup callback properly on your Gammu Api.channel($redisChannelName)
:(string)
Channel to publish to Redis. Default channel isgammu-channel
.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
- Muhammad Zamroni
- Kristian Drucker
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of gammu with dependencies
guzzlehttp/guzzle Version ~6.0
predis/predis Version ^1.1
illuminate/database Version ^5.1|^5.2|^5.3
illuminate/notifications Version ^5.3
illuminate/support Version ^5.1|^5.2|^5.3