Install the live chat widget on Laravel
XACUBE puts a live chat widget on your Laravel site, so your live agents can answer visitors the moment they ask, from one shared inbox. The free plan covers one agent.
Why XACUBE live chat on Laravel
- Open
resources/views/layouts/app.blade.phpand paste the code just before</body>. - Publish your site. The chat appears on every page.
<script src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY" async></script>
Replace YOUR_PUBLIC_KEY with your own key. In your panel, open your website and this code is shown with your key already in it.
Recognise signed-in customers
{{-- config/services.php: 'xacube' => ['secret' => env('XACUBE_SECRET_KEY')] --}}
@auth
<script src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY"
data-user-id="{{ auth()->id() }}"
data-user-hash="{{ hash_hmac('sha256', (string) auth()->id(), config('services.xacube.secret')) }}"
data-user-name="{{ auth()->user()->name }}"
data-user-email="{{ auth()->user()->email }}" async></script>
@else
<script src="https://chat.xacube.chat/w.js" data-key="YOUR_PUBLIC_KEY" async></script>
@endauth