Download the PHP package homedoctor-es/laravel-intercom without Composer
On this page you can find all versions of the php package homedoctor-es/laravel-intercom. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download homedoctor-es/laravel-intercom
More information about homedoctor-es/laravel-intercom
Files in homedoctor-es/laravel-intercom
Package laravel-intercom
Short Description Laravel integration of the [Intercom PHP SDK](https://github.com/intercom/intercom-php).
License BSD-3-Clause
Informations about the package laravel-intercom
Intercom SDK integration for Laravel
Laravel integration for the Intercom SDK.
Installation
The preferred way to install this extension is through composer.
With Composer installed, you can then install the extension using the following commands:
or add
to the section of your composer.json
file.
Configuration
- Register the ServiceProvider in your config/app.php service provider list.
config/app.php
- If you want, you can add the following facade to the $aliases section.
config/app.php
-
Publish the Intercom provider
- Set the reference, api_key and base_url in the config/intercom.php file.
config/intercom.php
- Or use .env file
Usage
You can use the facade alias Intercom to execute services of the Intercom sdk. The authentication params will be automatically injected.
Or use Laravel Service Container to get The Intercom Instance.
Once you have done this steps, you can use all Intercom SDK endpoints as are described in the sdk package documentation.
Notification channel usage
Now you can use the channel in your via()
method inside the notification:
And/or in your notifiable model define method returning an array or null if not routed field. Your model must be use Notifiable trait-
Available methods
body('')
: Accepts a string value for the Intercom message bodyemail()
: Accepts a string value for the Intercom message typeemail
inapp()
: Accepts a string value for the Intercom message typeinapp
(default)subject('')
: Accepts a string value for the Intercom message body (using withemail
type)plain()
: Accepts a string value for the Intercom message plain templatepersonal()
: Accepts a string value for the Intercom message personal templatefrom('123')
: Accepts a string value of the admin's id (sender)to(['type' => 'user', 'id' => '321'])
: Accepts an array value for the recipient datatoUserId('')
: Accepts a string value for the Intercom message user by id recipienttoUserEmail('')
: Accepts a string value for the Intercom message user by email recipienttoContactId('')
: Accepts a string value for the Intercom message contact by id recipient
More info about fields read in Intercom API Reference
All versions of laravel-intercom with dependencies
illuminate/support Version >=5.7
illuminate/notifications Version >=5.7
php-http/guzzle6-adapter Version ^2.0
intercom/intercom-php Version ^4.4