Laravel chatbot package for Q&A, FAQ and support. Database-driven intents with keyword AND/OR matching, conditional replies, buttons and variable substitution. Works with Laravel 8–12 and integrates with BotMan (web driver) for web/embedded chat widgets.
emmanuel-saleem/laravel-chatbot is a Laravel package for laravel chatbot package for q&a, faq and support. database-driven intents with keyword and/or matching, conditional replies, buttons and variable substitution. works with laravel 8–12 and integrates with botman (web driver) for web/embedded chat widgets..
It currently has 0 GitHub stars and 190 downloads on Packagist (latest version 1.0.6).
Install it with composer require emmanuel-saleem/laravel-chatbot.
Discover more Laravel packages by emmanuel-saleem
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package that lets you manage chatbot Q&A in the database, with keyword matching (AND/OR), conditions, variable substitution, BotMan integration, an admin UI, a minimal web chat, and a floating chat widget.
[email protected]composer require emmanuel-saleem/laravel-chatbot
BotMan is included as a dependency. If you need the web driver explicitly:
composer require botman/driver-web:^1.5
Publish everything:
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider"
Or selectively:
# Config
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-config
# Migrations
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-migrations
# Views (UI)
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-views
php artisan migrate
The package registers routes automatically:
POST /api/chatbot/message for programmatic accessIf you are using a test/breeze app, protect admin routes with auth as needed.
After installation, you can access the admin interface at:
http://your-app.com/admin/bot-questionshttp://your-app.com/admin/bot-questions/createhttp://your-app.com/admin/bot-questions/importOr use route helpers in your code:
route('bot-questions.index') // List all questions
route('bot-questions.create') // Create new question
route('bot-questions.import') // Import questions from JSON
Note: Protect these routes with authentication middleware in your application. For example, in routes/web.php:
Route::middleware(['auth'])->prefix('admin/bot-questions')->group(function () {
// Package routes are already registered, but you can wrap them
});
/admin/bot-questions/create)@{{user.name}}, @{{user.email}}, @{{session.deal_count}})/admin/bot-questions/import)JSON Structure Example:
[
{
"question": "What is your return policy?",
"keywords": ["return", "refund", "policy"],
"logic_operator": "OR",
"answer": "We offer a 30-day return policy.",
"priority": 10,
"is_active": true,
"buttons": [
{
"label": "Learn More",
"url": "https://example.com/returns",
"style": "primary",
"target": "_blank"
}
]
}
]
Each question supports:
@{{user.name}}, @{{user.email}}, @{{session.deal_count}}The package includes a simple web chat at:
route('botman.web-chat')
This view posts to the BotMan controller and renders replies and buttons.
Include the Blade snippet anywhere (typically at the end of your base layout before </body>):
@include('laravel-chatbot::components.floating-chat')
The widget opens a compact chat panel and sends messages to the same BotMan web endpoint. No Tailwind required (uses inline styles).
Endpoint:
POST /api/chatbot/message
Payload:
{
"message": "Hi",
"session_data": {
"deal_count": 3
}
}
Response (example):
{
"success": true,
"data": {
"matched": true,
"question_id": 1,
"message": "Hello John",
"buttons": [
{ "label": "Join Call", "url": "https://...", "target": "_blank", "style": "primary" }
]
}
}
See API_USAGE.md for more details.
If you use the provided Breeze-based test app layout, a theme toggle is included in resources/views/components/admin-layout.blade.php. The theme persists in localStorage('theme') and toggles the <html>.dark class.
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-views --force
php artisan view:clear
# Install
composer require emmanuel-saleem/laravel-chatbot
# Publish all
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider"
# Or publish individually
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-config
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-migrations
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-views
# Migrate
php artisan migrate
# Clear compiled views (useful during dev)
php artisan view:clear
--force when re-publishing views and clear compiled views:
php artisan vendor:publish --provider="EmmanuelSaleem\LaravelChatbot\Providers\LaravelChatbotServiceProvider" --tag=laravel-chatbot-views --force
php artisan view:clear
credentials: 'same-origin'.admin-layout.blade.php exists or remove it to use the package's default.Happy building! If something feels rough, open an issue or send a PR.