<commit_before># AirSob
A Laravel 5.3 Notification/PHP Library for Airsob

# To Use

Run `composer require kasoprecede47/air-sob`

#For Laravel Users
Add `AirSob\AirSobServiceProvider::class` to `app.php` 

Add `'airsob' => [
        'service_id' => 'Your Service Id',
        'service_key' => 'Your Key',
        'format' => 'json'
    ]` to `services.php`



 # AirSob notifications channel for Laravel 5.3

[![Latest Version on Packagist](https://img.shields.io/packagist/v/kasoprecede47/air-sob.svg?style=flat-square)](https://packagist.org/packages/kasoprecede47/air-sob)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Total Downloads](https://img.shields.io/packagist/dt/kasoprecede47/air-sob.svg?style=flat-square)](https://packagist.org/packages/kasoprecede47/air-sob)

This package makes it easy to send [AirSob notifications](https://airsob.com/) with  Laravel 5.3.

## Contents

- [Installation](#installation)
    - [Setting up your AirSob account](#setting-up-your-AirSob-account)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

## Installation

You can install the package via composer:

``` bash
composer require kasoprecede47/air-sob
```

You must install the service provider:

```php
// config/app.php
'providers' => [
    ...
    AirSob\AirSobServiceProvider::class,
],
```

### Setting up your AirSob account

Add your AirSob Account Key, Acess Token, and From Number (optional) to your `config/services.php`:

```php
// config/services.php
...
'airSob' => [
    'service_id' => 'Your Service Id',
    'service_key' => 'Your Key',
    'format' => 'json'
],
...
```

## Usage

Now you can use the channel in your `via()` method inside the notification:

``` php
use NotificationChannels\AirSob\AirSobChannel;
use NotificationChannels\AirSob\AirSobMessage;
use Illuminate\Notifications\Notification;

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

    public function toAirsob($notifiable)
    {
        return (new AirSobMessage('Your {$notifiable->service} account was approved!'));
    }
}
```

In order to let your Notification know which phone number you are sending to, add the `routeNotificationForAirSob` method to your Notifiable model e.g your User Model

```php
public function routeNotificationForAirSob()
{
    return $this->phone; // where `phone` is a field in your users table;
}
```

### Available Message methods

#### AirSobMessage

- `setDestination('')`: Accepts a phone to use as the notification sender.
- `setMesssage('')`: Accepts a string value for the notification body.

## Changelog

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


## Security

If you discover any security related issues, please email <EMAIL> instead of using the issue tracker.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Credits

- [<NAME>](https://github.com/kasoprecede47)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.<commit_msg>Initial Fixes<commit_after># AirSob notifications channel for Laravel 5.3

[![Latest Version on Packagist](https://img.shields.io/packagist/v/kasoprecede47/air-sob.svg?style=flat-square)](https://packagist.org/packages/kasoprecede47/air-sob)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Total Downloads](https://img.shields.io/packagist/dt/kasoprecede47/air-sob.svg?style=flat-square)](https://packagist.org/packages/kasoprecede47/air-sob)

This package makes it easy to send [AirSob notifications](https://airsob.com/) with  Laravel 5.3.

## Contents

- [Installation](#installation)
    - [Setting up your AirSob account](#setting-up-your-AirSob-account)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

## Installation

You can install the package via composer:

``` bash
composer require kasoprecede47/air-sob
```

You must install the service provider:

```php
// config/app.php
'providers' => [
    ...
    AirSob\AirSobServiceProvider::class,
],
```

### Setting up your AirSob account

Add your AirSob Account Key, Acess Token, and From Number (optional) to your `config/services.php`:

```php
// config/services.php
...
'airSob' => [
    'service_id' => 'Your Service Id',
    'service_key' => 'Your Key',
    'format' => 'json'
],
...
```

## Usage

Now you can use the channel in your `via()` method inside the notification:

``` php
use AirSob\AirSobChannel;
use AirSob\AirSobMessage;
use Illuminate\Notifications\Notification;

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

    public function toAirsob($notifiable)
    {
        return (new AirSobMessage('Your {$notifiable->service} account was approved!'));
    }
}
```

In order to let your Notification know which phone number you are sending to, add the `routeNotificationForAirSob` method to your Notifiable model e.g your User Model

```php
public function routeNotificationForAirSob()
{
    return $this->phone; // where `phone` is a field in your users table;
}
```

### Available Message methods

#### AirSobMessage

- `setDestination('')`: Accepts a phone to use as the notification sender.
- `setMesssage('')`: Accepts a string value for the notification body.

## Changelog

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


## Security

If you discover any security related issues, please email <EMAIL> instead of using the issue tracker.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Credits

- [<NAME>](https://github.com/kasoprecede47)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
{'fraction_non_alphanumeric': 0.13962323887921482, 'fraction_numerical': 0.005698907709355707, 'mean_word_length': 4.437177280550775, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2690601', 'n_tokens_mistral': 2122, 'n_tokens_neox': 2004, 'n_words': 536}