atournayre/confirmation-bundle
Symfony bundle that adds confirmation flows to your entities. Make entities confirmable via an interface/trait, generate and validate confirmation codes, and plug in custom delivery providers (email, SMS, etc.) configured through services and YAML routing.
ConfirmableInterface and ConfirmableTrait, reducing boilerplate.spatie/laravel-symfony). Key services (e.g., GenerateConfirmationService) are abstracted for easy porting.ConfirmationCodeService, ConfirmationCodeRepository), avoiding tight coupling with Laravel’s auth systems (e.g., Laravel Breeze/Sanctum).bundles.php, atournayre_confirmation.yaml, routing.yaml) and 1 service override, which is manageable for a TPM to scope.confirmation_code table (handled by the bundle’s ConfirmationCodeRepository). If using Laravel’s migrations, this can be merged into existing auth tables (e.g., users) or kept separate.confirmation.generated, confirmation.verified). Laravel’s event system can mirror this with minimal effort.spatie/laravel-symfony) or wrap providers in Laravel services.updateAfterConfirmation().
users table (e.g., as JSON)?spatie/laravel-symfony to resolve Symfony-specific dependencies (e.g., ContainerInterface).GenerateConfirmationService).ConfirmationGenerated → ConfirmationGenerated::dispatch()).confirmation_code fields to the users table (if using Laravel’s auth).confirmation_codes table with entity_type, entity_id, and code columns.ConfirmationCodeRepository to avoid Symfony’s Doctrine dependency.app_confirmation_code) with Laravel routes (e.g., confirmation.verify) while maintaining the same logic.AbstractProvider to create Laravel-compatible providers (e.g., EmailProvider using Laravel’s Mail facade).User) with email confirmation.Mailer, Events).Order, Subscription).throttle middleware).confirmation_code table).| Component | Compatibility Notes |
|---|---|
| Laravel Auth | Works with Laravel Breeze, Sanctum, Passport if providers are adapted. |
| Email/SMS Services | Supports Laravel’s Mail and Notifications via custom providers. |
| Database | Compatible with MySQL, PostgreSQL, SQLite (Laravel’s supported databases). |
| Queues | Can integrate with Laravel Queues for async confirmation code delivery. |
| Caching | Use Laravel Cache (Redis/Memcached) for storing generated codes. |
| Localization | Override Twig templates with Laravel’s Blade or use spatie/laravel-translatable. |
bundles.php.atournayre_confirmation.yaml config.ConfirmableTrait in your entity (e.g., User).Illuminate\Support, Illuminate/Events.spatie/laravel-symfony (for easier Symfony integration).ContainerException) may require cross-stack knowledge.How can I help you explore Laravel packages today?