tarre/laravel-notification-46elks

This package is abandoned and no longer maintained. The author suggests using the tarre/laravel-46elks package instead.

Laravel notification channel package for 46Elks.

1.2.1 2019-11-22 17:06 UTC

This package is not auto-updated.

Last update: 2020-03-10 15:45:55 UTC


README

Here's the latest documentation on Laravel 5.3 Notifications System:

https://laravel.com/docs/master/notifications

46Elks notification channel for Laravel

Latest Version on Packagist Software License Build Status

Quality Score Code Coverage Total Downloads

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

composer require dalnix/46elks

Setting up the 46Elks service

add the following to your config/services.php

'46elks' => [
	'username' => env('46ELKS_USERNAME'),
	'password' => env('46ELKS_PASSWORD'),
],

Also remember to update your .env with correct information

Usage

To use this channel simply create a notification that has the following content:


    public function via($notifiable)
    {
        return [FortySixElksChannel::class];
    }

 
    public function to46Elks($notifiable)
    {
        return (new FortySixElksSMS())
	        ->line('Testsms')
	        ->line('Olle')
	        ->to('+46762216234')
	        ->from('Emil');
    }

The FortySixElksSMS have the following methods, all chainable.

Available Message methods

`from($mixed)`. Accepts a string up to 11 characters or number. Sms will be sent with that name.

`to($number)`. International phonenumber.

`line($string)`. Every string in a line will be on its own row.

`flash()`. Will set the messagetype to flash. Will not endup in sms inbox. See This tweet to find out how it looks on an iphone.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email emil@dalnix.se 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.