Adding Intercom to your Laravel Application

I was searching for a solution on the web and couldn’t find anything out there explaining how to integrate Laravel Application with intercom and track new users. I created a video here to help you with integration.

Blade File

<script>
window.intercomSettings = {
app_id: “ljl5pob4”,
name: “{{ Auth::user()->name }}”,
email: “{{ Auth::user()->email }}”,
user_hash: “{{ $user_hash }}”
}
</script>

Controller File

$user_hash = hash_hmac(
‘sha256’,
\Auth::user()->email,
env(‘INTERCOM_SECRET_KEY’)
);
return view(‘home’)->with([ ‘user_hash’ => $user_hash]);

We’re a small digital website design company in Washington DC, if you would like to get consultation, feel free to visit us.

Web Guru DC is a web development agency in Washington DC. This is just a simple blog for the website.