New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

escolalms/mailerlite

Escola LMS MailerLite integration.
11,006
Install
composer require escolalms/mailerlite
Latest Version:0.4.2
PHP:>=7.4
Laravel:8 · 9
License:MIT
Last Updated:Jul 12, 2023
Links: GitHub  ·  Packagist
Maintainer: qunabu

MailerLite

codecov phpunit downloads downloads downloads Maintainability Test Coverage

What does it do

This package is used for integration with MailerLite after dispatching events.

Installing

  • composer require escolalms/mailerlite

Example

You can set the package status and api key using the Facade

Config::set('escolalms_mailer_lite.package_status', PackageStatusEnum::ENABLED);
Config::set('escolalms_mailer_lite.api_key', '1234);

or Settings package

$this->actingAs($this->user, 'api')->postJson(
    '/api/admin/config',
    [
        'config' => [
            [
                'key' => 'escolalms_mailer_lite.package_status',
                'value' => PackageStatusEnum::ENABLED,
            ],
            [
                'key' => 'escolalms_mailer_lite.api_key',
                'value' => '1234',
            ],
        ]
    ]
);

Group names are also configurable.

$this->actingAs($this->user, 'api')->postJson(
    '/api/admin/config',
    [
        'config' => [
            [
                'key' => 'escolalms_mailer_lite.group_registered_group',
                'value' => 'registered users',
            ],
            [
                'key' => 'escolalms_mailer_lite.group_order_paid',
                'value' => 'order paid',
            ],
            [
                'key' => 'escolalms_mailer_lite.group_left_cart',
                'value' => 'left cart',
            ],
        ]
    ]
);

Tests

Run ./vendor/bin/phpunit to run tests.

Test details codecov phpunit

Listeners

Handling events

  • EscolaLms\Auth\Events\AccountConfirmed => add to group of registered users (escolalms_mailer_lite.group_registered_group)
  • EscolaLms\Cart\Events\ProductBought => add to group of users with paid orders (escolalms_mailer_lite.group_order_paid)
  • EscolaLms\Auth\Events\AccountBlocked => remove from all groups
  • EscolaLms\Cart\Events\AbandonedCartEvent => add to the group of users with abandoned carts (escolalms_mailer_lite.group_left_cart)
  • EscolaLms\Cart\Events\OrderCreated => remove from the group of users with abandoned carts (escolalms_mailer_lite.group_left_cart)

Related Packages

owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

43,476,394 3,472
mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

22,513,234 1,979
kyslik/column-sortable

Package for handling column sorting in Laravel 6.x

6,507,424 643
mews/captcha

Laravel 5/6/7/8/9/10/11/12 Captcha Package

6,281,495 2,589
ajthinking/archetype

Programmatically edit PHP and Laravel files.

4,797,093 271

Version History

Version Released PHP Laravel License
0.4.2 >=7.4 >=8.0 MIT
0.4.1 >=7.4 >=8.0 MIT
0.4.0 >=7.4 >=8.0 MIT
0.0.7 >=7.4 >=8.0 MIT
0.0.6 >=7.4 >=8.0 MIT