Download the PHP package larsemil/46elks without Composer
On this page you can find all versions of the php package larsemil/46elks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download larsemil/46elks
More information about larsemil/46elks
Files in larsemil/46elks
Package 46elks
Short Description Laravel notification channel package for 46Elks.
License MIT
Homepage https://github.com/larsemil/46Elks
Informations about the package 46elks
Here's the latest documentation on Laravel 5.3 Notifications System:
https://laravel.com/docs/master/notifications
46Elks notification channel for Laravel
This package makes it easy to send notifications using 46Elks with Laravel 5.3.
46Elks has a whole bunch of phone oriented services. This package takes care of:
- SMS
With more endpoints to come. Feel free to contribute.
Contents
- Installation
- Setting up the 46Elks service
- Usage
- Available Message methods
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
Setting up the 46Elks service
add the following to your config/services.php
Also remember to update your .env with correct information:
You will find your username and password at https://46elks.se/account
Usage
To use this channel simply create a notification that has the following content:
Available mediums
SMS
The FortySixElksSMS have the following methods, all chainable.
Available Message methods for sms
from($mixed)
. Accepts a string up to 11 characters or number. Sms will be sent with that name.
to($number)
. International phone number.
line($string)
. Every string in a line will be on its own row.
flash()
. Will set the message type to flash. Will not endup in sms inbox. See This tweet to find out how it looks on an iphone.
MMS
To use MMS simply use new FortySixElksMMS()
instead of new FortySixElksSMS()
The FortySixElksMMS have the following methods, all chainable.
Available Message methods
from($mixed)
. Accepts 'noreply' as a string or a MMS activated number
to($number)
. International phone number.
line($string)
. Every string in a line will be on its own row.
image()
. URL to the image to send in mms.
Error handling
How to handle notification send errors
If for any reason there would be an error when sending a notification it will fire a
Illuminate\Notifications\Events\NotificationFailed
event. You can then listen for that.
Example:
And the event has $event->notifiable
, $event->notification
, $event->channel
and $event->data
(where you have the exception at $event->data['exception']
)
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
- Emil Österlund
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of 46elks with dependencies
guzzlehttp/guzzle Version ^6.3
illuminate/events Version ^5.7
illuminate/notifications Version ^5.4
illuminate/support Version ^5.4