itainathaniel/nova-intercom-viewer

Laravel Nova resource tool to view user's data from intercom.io

v1.0.1 2018-09-10 23:38 UTC

This package is not auto-updated.

Last update: 2024-04-18 02:07:32 UTC


README

Laravel Nova resource tool to view user's data from intercom.io

Latest Version on Packagist Total Downloads

User profile partial panel screenshot of the user profile partial panel

More data view, including some extra data, location & custom attributes screenshot of the more data view, including some extra data, location & custom attributes

Events view screenshot of the events view

Conversations view screenshot of the conversations view

Notes view screenshot of the notes view

Installation

This package relies on Intercom's Laravel package. If you hadn't installed it already, do that now and follow their instructions, and at the end you need to add Intercom's data to you config/services.php file as follows:

'intercom' => [
    'app_id' => env('INTERCOM_APP_ID'),
    'token' => env('INTERCOM_TOKEN'),
    'secret_key' => env('INTERCOM_SECRET_KEY'),
],

Install the package in to a Laravel app that uses Nova via composer:

composer require itainathaniel/nova-intercom-viewer

Now you can register this resource tool in your App\Nova\User or any other model who uses Intercom on your application. I'll use the User for demonstration purposes:

// in app/Nova/User.php

use Itainathaniel\IntercomViewer\IntercomViewer;

// ...

public function fields()
{
    return [
        // ...
        IntercomViewer::make()->onlyOnDetail(),
    ];
}

The default view in the user profile page contains all the field Intercom provide. You can selectively hide them, by chaining hide function of the maker, like so:

// in app/Nova/User.php

IntercomViewer::make()
	->onlyOnDetail()
	->hideEmail()
	->hideLastseenip(),

And so on. The complete list of functions you could use is this:

  • hideAvatar()
  • hideId()
  • hideEmail()
  • hidePhone()
  • hideName()
  • hideAnonymous()
  • hidePseudonym()
  • hideLastseenip()
  • hideSessioncount()
  • hideUnsubscribedfromemails()
  • hideMarkedemailasspam()
  • hideHashardbounced()
  • hideUseragentdata()
  • hideAnalytics()

Security

If you discover any security related issues, please email itainathaniel@gmail.com or use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.