LaravelPackages.net
Acme Inc.
Toggle sidebar
steadfastcollective/laravel-customer-io

Customer.io notification channel for Laravel

3.625
2
1.1.5
About steadfastcollective/laravel-customer-io

steadfastcollective/laravel-customer-io is a Laravel package for customer.io notification channel for laravel. It currently has 2 GitHub stars and 3.625 downloads on Packagist (latest version 1.1.5). Install it with composer require steadfastcollective/laravel-customer-io. Discover more Laravel packages by steadfastcollective or browse all Laravel packages to compare alternatives.

Last updated

Customer io notification channel for Laravel

Latest Version on Packagist Build Status Total Downloads StyleCI

This package makes it easy to send notifications using the Customer io API with Laravel.

About

The Customer io channel makes it possible to send out Laravel notifications as a Customer io event. The notifiable model data will also be synced with Customer io and kept up to date.

Installation

You can install the package via composer:

composer require steadfastcollective/laravel-customer-io

Setting up the Customer io service

You will need to create a Customer io account to use this channel. Within your account, you will find the API key and the site ID. Place them inside your .env file:

CUSTOMER_IO_ENABLED=true
CUSTOMER_IO_SITE_ID=[SITE_ID]
CUSTOMER_IO_API_KEY=[API_KEY]
CUSTOMER_IO_MODEL=App\User

Usage

Add the trait to your notifiable model:

use Steadfastcollective\LaravelCustomerIo\Traits\SyncsToCustomerIo;

class User extends Authenticatable
{
    use Notifiable, SyncsToCustomerIo;
    
    // ...
}

Adding customer io support to the notification class:

use Steadfastcollective\LaravelCustomerIo\Channels\CustomerIoChannel;
    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [
            CustomerIoChannel::class,
        ];
    }

    /**
     * Get the customer io representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toCustomerIo($notifiable)
    {
        return [
            // ...
        ];
    }
}

Sync all customers with customer.io with a single command:

php artisan customer-io:sync-customers

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

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

Star History Chart