PHPackages                             warksit/laravel-mail-chimp-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. warksit/laravel-mail-chimp-sync

ActiveLibrary[API Development](/categories/api)

warksit/laravel-mail-chimp-sync
===============================

Sync Laravel Models with MailChimp as Members or Interests

v1.0.0(8mo ago)31.2k1MITPHP

Since Dec 3Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/warksit/laravel-mail-chimp-sync)[ Packagist](https://packagist.org/packages/warksit/laravel-mail-chimp-sync)[ RSS](/packages/warksit-laravel-mail-chimp-sync/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Laravel MailChimp Sync for Laravel 5.2
======================================

[](#laravel-mailchimp-sync-for-laravel-52)

[ ![Codeship Status for warksit/laravel-mail-chimp-sync](https://camo.githubusercontent.com/db829bf6169a693bd90fd97743ee6b81f850cdd6b72f225831e0035cf3d761bc/68747470733a2f2f636f6465736869702e636f6d2f70726f6a656374732f36666537623930302d323766652d303133342d383636322d3536303066353563653663612f7374617475733f6272616e63683d6d6173746572)](https://codeship.com/projects/162370)

A package to sync subscribers and interests (using eloquent events) with MailChimp (API v3) for Laravel 5.2+. It's only dependency is Guzzle 6 or 7.

Installation
------------

[](#installation)

To get started, require this package:

```
composer require warksit/laravel-mail-chimp-sync
```

Add the ServiceProvider in `config/app.php`:

```
    'providers' => [
        ...
        Warksit\LaravelMailChimpSync\MailingListServiceProvider::class,
    ],
```

Next run vendor:publish to copy the migrations.

```
php artisan vendor:publish --provider="Warksit\LaravelMailChimpSync\MailingListServiceProvider"
```

Run the migrations:

```
php artisan migrate
```

Usage
-----

[](#usage)

This package has 2 main uses. It syncs subscribers to a list(s) and syncs a list of interests of an interest group(s). It makes use of eloquent events to detect changes and also makes use of queued jobs so the relative expensive calls to MailChimp don't slow your program flow. The one exception is deleting a model as we need to remove that from MailChimp while the record still exists.

### Sync Subscribers

[](#sync-subscribers)

This allows you to keep changes you make to an Eloquent Model in sync with a MailChimp List. It uses eloquent events. This is achieved through the `Warksit\LaravelMailChimpSync\EloquentTraits\MailChimpSyncMember` trait. This requires a few methods on the model which are enforced by implementing the `Warksit\LaravelMailChimpSync\EloquentTraits\CanSyncMailChimpMember` interface. Have a look in the doc blocks for more details. If you have overidden the `boot()` method make sure you call `parent::boot()` no worries if you haven't.

```
    use Warksit\LaravelMailChimpSync\Interfaces\CanSyncMailChimpMember;
    use Warksit\LaravelMailChimpSync\EloquentTraits\MailChimpSyncMember;

    class YourModel extends Model implements CanSyncMailChimpMember
    {
        use MailChimpSyncMember

        protected static function boot()
        {
            parent::boot();
            ...
        }
    }
```

### Sync Interest

[](#sync-interest)

This allows you to keep changes you make to an Eloquent Model in Sync as the Interest for an Interest Group. This is achieved through the `Warksit\LaravelMailChimpSync\EloquentTraits\MailChimpSyncInterest` trait. This requires a few methods on the model which are enforced by implementing the `Warksit\LaravelMailChimpSync\EloquentTraits\CanSyncMailChimpInterest` interface. Have a look in the doc blocks for more details. Again if you have overidden the `boot()` method make sure you call `parent::boot()` no worries if you haven't.

```
    use Warksit\LaravelMailChimpSync\Interfaces\CanSyncMailChimpInterest;
    use Warksit\LaravelMailChimpSync\EloquentTraits\MailChimpSyncInterest;

    class YourInterestModel extends Model implements CanSyncMailChimpInterest
    {
        use MailChimpSyncInterest;

        protected static function boot()
        {
            parent::boot();
            ...
        }
    }
```

### Manual Sync

[](#manual-sync)

If you would like to trigger a sync for a model at another time just call `$memberModel->mailingListSubscribe()` to resync a member or `$interestModel->addInterestGroup()` on the relevant model. This is particularly useful to add a new interest to a member.

Contributing
------------

[](#contributing)

Please! This meets my needs but am open to help. If you find an issue, or have a better way to do something, open an issue or a pull request. There are some tests. To get the integration tests to work copy `.env.example` to `.env` and enter your MailChimp credentials.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance60

Regular maintenance activity

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b719bdf117b56840b92f66ce8905a45a645e907d5859aef363e43aea1fd6f22?d=identicon)[warksit](/maintainers/warksit)

---

Top Contributors

[![warksit](https://avatars.githubusercontent.com/u/5296633?v=4)](https://github.com/warksit "warksit (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/warksit-laravel-mail-chimp-sync/health.svg)

```
[![Health](https://phpackages.com/badges/warksit-laravel-mail-chimp-sync/health.svg)](https://phpackages.com/packages/warksit-laravel-mail-chimp-sync)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k52](/packages/neuron-core-neuron-ai)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[volcengine/volcengine-php-sdk

119.5k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
