A Laravel package for seamless integration with Sendy email marketing platform.
- 🔄 Automatic subscriber synchronization with Sendy
- 🎯 Flexible field mapping
- 🚀 Artisan command for bulk synchronization
- 🔍 Event-driven architecture
- 💾 Cache-based tracking
- ⚡ Efficient chunk processing
- 🛡️ Error handling and logging
Laravel Version | Package Version |
---|---|
10.x | ^1.0 |
9.x | ^1.0 |
8.x | ^1.0 |
7.x | ^1.0 |
6.x | ^1.0 |
- PHP 7.4+
- Laravel 6.0 - 10.0
- Sendy installation
composer require skaisser/larasendy
Publish the configuration file:
php artisan vendor:publish --provider="Skaisser\LaraSendy\LaraSendyServiceProvider"
Configure your .env
file:
SENDY_URL=your-sendy-installation-url
SENDY_API_KEY=your-api-key
SENDY_LIST_ID=your-list-id
- Add the
SendySubscriber
trait to your User model:
use Skaisser\LaraSendy\Traits\SendySubscriber;
class User extends Model
{
use SendySubscriber;
}
- Configure field mapping in
config/sendy.php
:
'fields_mapping' => [
'email' => 'email',
'name' => 'name',
'company' => 'company',
'country' => 'country'
]
The package automatically syncs users when they are:
- Created
- Updated
- Deleted (configurable behavior)
Use the artisan command to sync all subscribers:
php artisan sendy:sync
The package dispatches events that you can listen to:
SendySubscriberSynced
: When a subscriber is successfully syncedSendySubscriberFailed
: When sync fails
Sync status is tracked in cache:
- Success:
sendy_sync_status_{id}
- Errors:
sendy_sync_error_{id}
composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email the author instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.