PHPackages                             homedoctor-es/laravel-intercom - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. homedoctor-es/laravel-intercom

ActiveLibrary[API Development](/categories/api)

homedoctor-es/laravel-intercom
==============================

Laravel integration of the \[Intercom PHP SDK\](https://github.com/intercom/intercom-php).

1.0.0(4y ago)03.1k↓40%1BSD-3-ClausePHPPHP &gt;=7.0

Since Dec 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/homedoctor-es/laravel-intercom)[ Packagist](https://packagist.org/packages/homedoctor-es/laravel-intercom)[ RSS](/packages/homedoctor-es-laravel-intercom/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Intercom SDK integration for Laravel
====================================

[](#intercom-sdk-integration-for-laravel)

Laravel integration for the [Intercom SDK](https://github.com/intercom/intercom-php).

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

With Composer installed, you can then install the extension using the following commands:

```
$ php composer.phar require homedoctor-es/laravel-intercom
```

or add

```
...
    "require": {
        "homedoctor-es/laravel-intercom": "*"
    }
```

to the `require` section of your `composer.json` file.

Configuration
-------------

[](#configuration)

1. Register the ServiceProvider in your config/app.php service provider list.

config/app.php

```
return [
    //other stuff
    'providers' => [
        //other stuff
        \HomedoctorEs\Laravel\Intercom\IntercomServiceProvider::class,
    ];
];
```

2. If you want, you can add the following facade to the $aliases section.

config/app.php

```
return [
    //other stuff
    'aliases' => [
        //other stuff
        'Intercom' => \HomedoctorEs\Laravel\Intercom\Facades\Intercom::class,
    ];
];
```

3. Publish the Intercom provider

```
php artisan vendor:publish --provider="HomedoctorEs\Laravel\Intercom\IntercomServiceProvider"

```

4. Set the reference, api\_key and base\_url in the config/intercom.php file.

config/intercom.php

```
return [
    'is_channel_active' => env('INTERCOM_CHANNEL_ACTIVE', false),
    'api_token' => env('HOLDED_API_TOKEN'),
    'api_version' => env('HOLDED_API_VERSION', '2.3'),
    'admin_user_id' => env('INTERCOM_ADMIN_USER_ID')
];
```

5. Or use .env file

```
INTERCOM_CHANNEL_ACTIVE=true
HOLDED_API_TOKEN=
HOLDED_API_VERSION=2.3
INTERCOM_ADMIN_USER_ID=

```

Usage
-----

[](#usage)

You can use the facade alias Intercom to execute services of the Intercom sdk. The authentication params will be automatically injected.

```
$contacts = \HomedoctorEs\Laravel\Intercom\Facades\Intercom::users();
```

Or use Laravel Service Container to get The Intercom Instance.

```
app(\HomedoctorEs\Laravel\Intercom\Intercom::class)->users();
```

Once you have done this steps, you can use all Intercom SDK endpoints as are described in the [sdk package documentation](https://github.com/intercom/intercom-php).

\##Notification channel usage

Now you can use the channel in your `via()` method inside the notification:

```
use HomedoctorEs\Laravel\Intercom\Notifications\Channel\IntercomChannel;
use HomedoctorEs\Laravel\Intercom\Notifications\Messages\IntercomMessage;
use Illuminate\Notifications\Notification;

class IntercomNotification extends Notification
{
    public function via($notifiable)
    {
        return ["intercom"];
    }

    public function toIntercom($notifiable): IntercomMessage
    {
        return IntercomMessage::create("This is a test message")
            ->from(config('intercom.admin_user_id'))
            ->toUserId(xxxxx);  //this param can be resolved later in routeNotificationForIntercom
    }
}
```

And/or in your notifiable model define method returning an array or null if not routed field. Your model must be use Notifiable trait-

```
class User
{
    use Notifiable;

    // ...

    public function routeNotificationForIntercom($notification): ?array
    {
        if (!$this->intercom_contact_id) {
            return null;
        }
        return [
            'type' => 'user',
            'id' => $this->intercom_contact_id
        ];
    }
}
```

### Available methods

[](#available-methods)

- `body('')`: Accepts a string value for the Intercom message body
- `email()`: Accepts a string value for the Intercom message type `email`
- `inapp()`: Accepts a string value for the Intercom message type `inapp` (default)
- `subject('')`: Accepts a string value for the Intercom message body (using with `email` type)
- `plain()`: Accepts a string value for the Intercom message plain template
- `personal()`: Accepts a string value for the Intercom message personal template
- `from('123')`: Accepts a string value of the admin's id (sender)
- `to(['type' => 'user', 'id' => '321'])`: Accepts an array value for the recipient data
- `toUserId('')`: Accepts a string value for the Intercom message user by id recipient
- `toUserEmail('')`: Accepts a string value for the Intercom message user by email recipient
- `toContactId('')`: Accepts a string value for the Intercom message contact by id recipient

More info about fields read in [Intercom API Reference](https://developers.intercom.com/intercom-api-reference/reference#admin-initiated-conversation)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1622d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13337359?v=4)[Homedoctor](/maintainers/Homedoctor)[@HomeDoctor](https://github.com/HomeDoctor)

---

Top Contributors

[![jsolam](https://avatars.githubusercontent.com/u/34037044?v=4)](https://github.com/jsolam "jsolam (1 commits)")

---

Tags

phplaravelintercomhomedoctor-es

### Embed Badge

![Health badge](/badges/homedoctor-es-laravel-intercom/health.svg)

```
[![Health](https://phpackages.com/badges/homedoctor-es-laravel-intercom/health.svg)](https://phpackages.com/packages/homedoctor-es-laravel-intercom)
```

###  Alternatives

[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[madeitbelgium/wordpress-php-sdk

WordPress Laravel PHP SDK

4422.9k1](/packages/madeitbelgium-wordpress-php-sdk)[dystcz/lunar-api

Dystore API layer for Lunar e-commerce package

411.1k3](/packages/dystcz-lunar-api)[gufy/whmcs

WHMCS API for Laravel 5

201.7k](/packages/gufy-whmcs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
