- How do I install and configure the Laravel Intercom notification channel?
- Install with composer require laravel-notification-channels/intercom, then publish the package config and set your Intercom access token through an environment variable. Add IntercomChannel::class to a notification's via() array and implement toIntercom() to return the payload. The package is a thin adapter over Laravel notifications and requires an Intercom access token.
- Which Laravel versions does laravel-notification-channels/intercom support?
- v1.4.0's headline change is Laravel 9 support, so the framework constraint now demonstrably includes Laravel 9. The provided context does not assert Laravel 10, 11, or 12 compatibility, so check composer.json constraints before installing on newer apps. The release may also have raised the PHP floor to ^8.0, which matters if you are still on PHP 7.4.
- How do I send an Intercom message from a Laravel notification?
- Add IntercomChannel::class to via() and implement a toIntercom() method that builds the message payload. Laravel calls the channel's send() contract, and the package forwards the payload to Intercom. You still need a configured access token and a notifiable model that resolves to an Intercom contact.
- How does the package resolve the Intercom recipient for a notifiable model?
- The channel resolves the recipient through routeNotificationForIntercom() on the Notifiable model. That method should return a stable Intercom user_id or email that already exists or can be matched in Intercom. Identity mapping is the hard part; email-only matching inherits Intercom's email-change and merge semantics, which your application cannot fully audit.
- Does this package support queued Intercom notifications?
- Yes, Intercom notifications can be queued like other Laravel notifications by implementing ShouldQueue on the notification class. The package remains a thin adapter and does not alter the queue pipeline. Queueing does not change Intercom-side identity requirements or error behavior.
- What are the production risks of using this Intercom notification channel?
- The main risks are API drift and silent failure. The package sits under intercom/intercom-php, so you inherit its PHP and Guzzle constraints, and the release notes do not mention an Intercom-Version header or SDK bump. Intercom 4xx responses such as contact not found, unverified domain, or rate limit may surface as no-ops, so monitor and verify failures in production.
- Is laravel-notification-channels/intercom actively maintained?
- It is minimally maintained: reactive, low-cadence, with no roadmap, and still single-maintainer. v1.4.0 is the first release since v1.3.0 in January 2023, which shows the repo is alive but does not establish a release cadence. Plan to own it in production rather than relying on upstream responsiveness.
- How do I handle Intercom API errors or failed notifications?
- The package is not described as adding error-handling changes, and notification channels commonly swallow or under-report upstream errors. An Intercom 4xx like contact not found, unverified domain, or rate limit may appear as a no-op. Wrap sends with your own logging, monitoring, and retry strategy, and verify Intercom-side delivery.
- Can I test Laravel notifications that use IntercomChannel?
- The package documentation context does not describe dedicated test helpers or a fake. Use Laravel's Notification::fake() for notification-level assertions and mock or swap the Intercom channel or SDK when asserting the toIntercom() payload. Assert that the correct recipient and payload are produced, and add integration coverage for Intercom error paths.
- What are alternatives to this package for Intercom in Laravel?
- There is no credible incumbent; the package is a single-purpose adapter and a very low-adoption option. An alternative is to call intercom/intercom-php directly from a custom notification channel or service, which gives you explicit control over the Intercom-Version header and error handling. You can also keep Laravel notifications and implement your own channel that wraps the SDK.