laravel-notification-channels/lob
Laravel Notification Channels Lob adds a notification channel for sending physical mail such as postcards and letters through Lob's API. Define a Lob message in your notification, configure your API key, and deliver mail using Laravel's built-in notification system.
Architecture fit
laravel-notification-channels family: it registers a channel class that Laravel's Notification dispatcher invokes via send($notifiable, Notification), and it expects a toLob() payload method on the notification plus a routeNotificationForLob() routing hook on the notifiable.Notification::fake()-style testing, and event hooks — no framework-level friction.letters, postcards, and checks APIs have different payload shapes, so confirm scope before assuming coverage.Integration feasibility
lob/lob-php SDK. None of this is complex, but it introduces a vendor contract with real-money billing into the notification layer.illuminate/* constraints around ^5.5|^6.0 and PHP ^7.x. On Laravel 10/11 with PHP 8.2+, expect a fork-and-bump exercise, not composer require.Technical risk
Key questions
lob/lob-php and illuminate/* versions are pinned, and does the API version header get set explicitly?Stack fit
Migration path
app/Notifications/Channels/ (or a small first-party package) and take ownership.lob/lob-php SDK is often less work than reconciling the fork.toLob() API shape is already documented in your team's muscle memory, preserve it in the fork to keep notification classes portable.Compatibility
illuminate/support and illuminate/notifications constraints, modernizing the Lob SDK client instantiation, and replacing any removed or renamed Lob resources.Lob-Version) rather than inherited from the SDK default, so future SDK bumps don't silently alter behavior.Http::fake()-based tests around the channel; Lob's SDK routes through Guzzle, so request assertions are straightforward and cheap.Sequencing
tries/backoff tuned to avoid duplicate mail.Maintenance
Support
Scaling
Failure modes
failed() handler that does not blindly re-dispatch.null, the channel may skip quietly. Fail loudly.Ramp-up
How can I help you explore Laravel packages today?