zzzRespant
← All integration guidesIntegration guide

Add Respant to your Laravel site

Laravel's Blade templating means almost every page extends one shared layout file, so the snippet goes in exactly one place no matter how many routes or views your app has.

Step by step

1

Open your main Blade layout

Look in resources/views/layouts/ for your app's shared layout, most commonly app.blade.php. Your individual views reference it with @extends('layouts.app') at the top of their own Blade files, that's the file to open.

2

Paste the snippet before </body>

Find the closing </body> tag near the bottom of the layout file, and paste your Respant embed snippet on its own line directly above it, outside of any @yield or @section block so it always renders regardless of which view extends the layout.

3

Clear the view cache if needed

If your app caches compiled views (common in production), run php artisan view:clear after saving, otherwise Laravel may keep serving the old compiled version of your layout.

4

Deploy and check your site

Deploy your change the way you normally do, then open your live site and confirm the chatbot launcher shows up on more than one route, confirming the shared layout is actually being used everywhere.

Using Laravel purely as an API with a separate frontend (Inertia with a JS framework, or a fully decoupled SPA)? Add the snippet to that frontend's own HTML entry point instead, the Blade layout approach above only applies when Laravel itself is rendering the HTML.

Your embed snippet

This is the exact line you paste. Your real snippet has your own chatbot's widget key filled in automatically, find it on your live preview screen right after you build your chatbot, or anytime from your dashboard under Website integration.

<script src="https://app.flenrok.com/flenrok-loader.js" data-respant-key="YOUR_WIDGET_KEY" async></script>

Don't type this by hand, copy it directly from your dashboard so the widget key matches your actual chatbot.

Test your widget

Open your live site in a normal browser tab, not a preview or editor view, and give the page a few seconds to fully load. Your chatbot's launcher should appear in the corner of the screen. Click it, type a real question a customer might ask, and check that the answer sounds right. If nothing shows up, clear your browser cache and reload, or double-check the snippet was saved in the right place and that you're looking at the published version of your site, not a draft.

Still stuck? Email us with your site URL and we'll take a look, or open the chatbot on the Respant site itself and ask it, it's trained to walk you through this exact step.

Haven't built your chatbot yet?

Build a working demo in minutes, free, no credit card. You'll get this exact snippet the moment it's ready.

Build My Demo Bot, Free