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(6mo ago)31.2k1MITPHP

Since Dec 3Pushed 6mo 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 today

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

34

—

LowBetter than 75% of packages

Maintenance65

Regular maintenance activity

Popularity19

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

209d 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.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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