PHP code example of escolalms / mailerlite

1. Go to this page and download the library: Download escolalms/mailerlite library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

escolalms / mailerlite example snippets

        
Config::set('escolalms_mailer_lite.package_status', PackageStatusEnum::ENABLED);
Config::set('escolalms_mailer_lite.api_key', '1234);
 
$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',
            ],
        ]
    ]
);

$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',
            ],
        ]
    ]
);