Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Mailchimp Api

Mailchimp Api Laravel Package

drewm/mailchimp-api

PHP wrapper for the Mailchimp API. Subscribe/unsubscribe users, manage lists, campaigns, templates and reports with simple calls. Designed for quick integration in Laravel or any PHP app, with minimal setup and practical examples.

Deep Wiki
Context7

Super-simple, minimum abstraction MailChimp API v3 wrapper, in PHP

Frequently asked questions about Mailchimp Api
Is this package still compatible with MailChimp’s latest API v3.x endpoints (e.g., transactional emails, advanced segments)?
No, this package hasn’t been updated since 2018 and may fail with MailChimp’s current API v3.x (now at v3.0+). You’ll need to manually override deprecated endpoints or fork the package to support newer features like transactional emails or OAuth 2.0 authentication.
How do I install and integrate this package into a Laravel application?
Run `composer require drewm/mailchimp-api`, then create a custom service class to bridge Laravel’s config/cache with the package. Example: Inject API keys from `config('services.mailchimp.key')` and wrap the client in a Laravel service for better dependency management.
Does this package support Laravel’s service container, caching, or queue systems?
No, it’s a raw PHP wrapper with no built-in Laravel integration. You’ll need to manually bind it to the container, cache responses, or use queues by extending the package or creating a custom facade/service.
What Laravel versions does this package support, and are there PHP version requirements?
It works with Laravel 5.5+ and PHP 7.1+, but may require polyfills for older versions. Test thoroughly, as the package lacks modern Laravel-specific optimizations like first-party HTTP client integration.
Can I use this package for async operations like webhooks or bulk email sends?
No, it only supports synchronous requests, which could block execution in Laravel queues or high-traffic apps. For async workflows, consider forking the package or using a maintained alternative with queue support.
How do I handle API failures or rate limits in production?
You’ll need to implement custom retry logic, circuit breakers, or fallback queues since the package lacks built-in error handling. Laravel’s queue system or packages like `spatie/queue-retries` can help manage failures gracefully.
Are there alternatives to this package that are actively maintained?
Yes, consider Mailchimp’s official PHP SDK (though it’s not Laravel-specific) or community forks like `spatie/laravel-mailchimp`. These offer better compatibility with Laravel’s ecosystem and MailChimp’s latest API changes.
How can I test this package in a Laravel application?
Use Laravel’s HTTP testing or VCR recordings to mock API responses. Since the package lacks built-in testing utilities, you’ll need to create custom test doubles for MailChimp endpoints and validate edge cases like rate limits or authentication failures.
Will this package work with Mailchimp’s OAuth 2.0 authentication?
No, it only supports legacy API keys. Mailchimp deprecated basic auth in favor of OAuth 2.0, so you’d need to fork the package or use a maintained alternative that includes OAuth 2.0 support.
What’s the best approach if I need Laravel-specific features like events or caching?
Extend the package by forking it and adding Laravel integrations (e.g., events via `MailchimpEvents`, caching via `Cache::remember`). Publish your fork as a private package or open-source alternative to avoid maintenance burdens.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport