Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Farid Inawan authored and Farid Inawan committed Oct 12, 2016
1 parent 622e8e0 commit fde5293
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

All notable changes to `smsgateway-me` will be documented in this file

## 1.0.0 - 201X-XX-XX
## 1.0.1 - 2016-10-12

- initial release
86 changes: 75 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ https://laravel.com/docs/master/notifications

# SMSGatewayMe Notifications Channel for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/smsgateway-me.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/smsgateway-me)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/frdteknikelektro/smsgateway-me.svg?style=flat-square)](https://packagist.org/packages/frdteknikelektro/smsgateway-me)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/laravel-notification-channels/smsgateway-me/master.svg?style=flat-square)](https://travis-ci.org/laravel-notification-channels/smsgateway-me)
[![Build Status](https://img.shields.io/travis/frdteknikelektro/smsgateway-me/master.svg?style=flat-square)](https://travis-ci.org/frdteknikelektro/smsgateway-me)
[![StyleCI](https://styleci.io/repos/:style_ci_id/shield)](https://styleci.io/repos/:style_ci_id)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/:sensio_labs_id.svg?style=flat-square)](https://insight.sensiolabs.com/projects/:sensio_labs_id)
[![Quality Score](https://img.shields.io/scrutinizer/g/laravel-notification-channels/smsgateway-me.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/smsgateway-me)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/laravel-notification-channels/smsgateway-me/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/smsgateway-me/?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/laravel-notification-channels/smsgateway-me.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/smsgateway-me)
[![Quality Score](https://img.shields.io/scrutinizer/g/frdteknikelektro/smsgateway-me.svg?style=flat-square)](https://scrutinizer-ci.com/g/frdteknikelektro/smsgateway-me)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/frdteknikelektro/smsgateway-me/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/frdteknikelektro/smsgateway-me/?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/frdteknikelektro/smsgateway-me.svg?style=flat-square)](https://packagist.org/packages/frdteknikelektro/smsgateway-me)

This package makes it easy to send notifications using [SMSGatewayMe](https://smsgateway.me) with Laravel 5.3.

This is where your description should go. Add a little code example so build can understand real quick how the package can be used. Try and limit it to a paragraph or two.


## Contents

Expand All @@ -34,30 +32,96 @@ This is where your description should go. Add a little code example so build can

## Installation

Please also include the steps for any third-party service setup that's required for this package.
You can install the package via composer:

``` bash
composer require frdteknikelektro/smsgateway-me
```

You must install the service provider:

```php
// config/app.php
'providers' => [
...
NotificationChannels\SMSGatewayMe\SMSGatewayMeServiceProvider::class,
],
```

### Setting up the SMSGatewayMe service

Optionally include a few steps how users can set up the service.
Sign up on [SMSGatewayMe](https://smsgateway.me). Setting all needed, then add this to your config:

```php
// config/services.php
...
'smsgateway-me' => [
'email' => env('SMSGATEWAYME_EMAIL', '[email protected]'),
'password' => env('SMSGATEWAYME_PASSWORD', 'password'),
'device_id' => env('SMSGATEWAYME_DEVICE_ID', '00000')
],
...
```

## Usage

Some code examples, make it clear how to use the package
You can now use the channel in your `via()` method inside the Notification class.

``` php
use NotificationChannels\SMSGatewayMe\SMSGatewayMeChannel;
use NotificationChannels\SMSGatewayMe\SMSGatewayMeMessage;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
public function via($notifiable)
{
return [SMSGatewayMeChannel::class];
}

public function toSmsGatewayMe($notifiable)
{
return (new SMSGatewayMeMessage)->text('Your invoice has been paid');
}
}
```

### Routing a message

You should add a `routeNotificationForSmsGatewayMe()` method in your notifiable model:

``` php
...
/**
* Route notifications for the SMSGatewayMe channel.
*
* @return int
*/
public function routeNotificationForSmsGatewayMe()
{
return $this->phone_number;
}
...
```

### Available methods

A list of all available options
- `text($text)`: (string) SMS Text.

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

Before running a test please configure `routeNotificationForSmsGatewayMe()` and `sendDataProvider()` on [`test/Test.php`](test/Test.php)

``` bash
$ composer test
```

This test will send Hello World SMS.

## Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Expand Down

0 comments on commit fde5293

Please sign in to comment.