Lead ingestion and contact request processing bundle for Symfony applications with dual Doctrine ORM and JSONL storage backends.
Lead domain value object (email/phone normalization, content size guarding, HMAC-hashed IP tracking).CaptureLead orchestration use-case.LeadCaptured after persistence so applications can notify email, Slack, Telegram, a CRM, or a webhook without coupling those transports to the bundle.composer require bahdan/lead-capture-bundle
Doctrine is optional. Install it only when selecting the Doctrine storage backend:
composer require doctrine/orm doctrine/dbal
The JSONL backend does not register or resolve Doctrine services.
When Doctrine storage is selected, the bundle registers its entity mapping automatically. Your application still owns schema migrations; generate and review a migration after enabling the bundle.
Listen for Bahdan\LeadCaptureBundle\Event\LeadCaptured with a regular Symfony event listener. The event contains the validated Lead; the listener can hand it to Messenger for asynchronous email, chat, CRM, or webhook delivery.
use Bahdan\LeadCaptureBundle\Event\LeadCaptured;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener]
final class NotifyAboutLead
{
public function __invoke(LeadCaptured $event): void
{
// Dispatch an application-specific notification or Messenger message.
}
}
Register the bundle in config/bundles.php:
return [
// ...
Bahdan\LeadCaptureBundle\LeadCaptureBundle::class => ['all' => true],
];
MIT
How can I help you explore Laravel packages today?