Download the PHP package laravel-notification-channels/46elks without Composer

On this page you can find all versions of the php package laravel-notification-channels/46elks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 46elks

46Elks notification channel for Laravel

Latest Version on Packagist Build Status

Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using 46Elks with Laravel.

46Elks has a whole bunch of phone oriented services. This package takes care of:

With more endpoints to come. Feel free to contribute.

Contents

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:

Another example without the notification implementation.

Available mediums

SMS

The FortySixElksSMS have the following methods, all chainable.

Available Message methods for sms

from($mixed) Accepts a string containing A-Z, a-z, 0-9 up to 11 characters or numbers. Space is not supported. 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.

dry() Enable when you want to verify your API request without actually sending an SMS to a mobile phone. No SMS message will be sent when this is enabled. To be able inspect a dry() request you need to send your message to +4670000000 then you can inspect it at https://46elks.com/logs

whenDelivered('http://localhost.se/ping') This webhook URL will receive a POST request every time the delivery status changes.

dontLog() Enable to avoid storing the message text in your history. The other parameters will still be stored.

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

License

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


All versions of 46elks with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
guzzlehttp/guzzle Version ^6.3 || ^6.5 || ^7.0
illuminate/events Version ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0
illuminate/notifications Version ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0
illuminate/support Version ~5.5 || ~6.0 || ~7.0 || ~8.0 || ~9.0 || ~10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-notification-channels/46elks contains the following files

Loading the files please wait ....