PHPackages                             sakibulrasel/laravel-chatbot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sakibulrasel/laravel-chatbot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sakibulrasel/laravel-chatbot
============================

A configurable rule-based chatbot package for Laravel applications.

v0.1.0(1mo ago)00MITPHPPHP ^8.2

Since Jun 6Pushed 1mo agoCompare

[ Source](https://github.com/sakibulrasel/laravel_chatbot)[ Packagist](https://packagist.org/packages/sakibulrasel/laravel-chatbot)[ RSS](/packages/sakibulrasel-laravel-chatbot/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

Laravel Chatbot
===============

[](#laravel-chatbot)

A Laravel package that adds a configurable rule-based chatbot to a Laravel application.

It includes:

- separate chatbot admin authentication
- questionnaire CRUD
- category CRUD
- unanswered-question review
- CSV questionnaire import/export
- analytics page
- embeddable frontend widget
- public chatbot API endpoints

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12

Installation
------------

[](#installation)

Install the package in a Laravel app:

```
composer require sakibulrasel/laravel-chatbot
```

Run the package installer:

```
php artisan chatbot:install
```

The install command will:

- publish the config file
- publish package migrations
- publish widget assets
- run migrations
- ask for chatbot admin credentials
- seed default settings
- optionally seed demo questions

Quick Start
-----------

[](#quick-start)

After installation:

1. Open the admin login:

```
/chatbot-admin/login

```

2. Log in with the credentials you created during `chatbot:install`.
3. Add or edit chatbot questions in:

```
/chatbot-admin/questionnaires

```

4. Render the widget in any Blade view:

```

```

Package Routes
--------------

[](#package-routes)

### Admin Routes

[](#admin-routes)

Default admin prefix:

```
/chatbot-admin

```

Main admin pages:

- `/chatbot-admin/login`
- `/chatbot-admin/dashboard`
- `/chatbot-admin/analytics`
- `/chatbot-admin/categories`
- `/chatbot-admin/questionnaires`
- `/chatbot-admin/unanswered-questions`
- `/chatbot-admin/settings`

### Public Routes

[](#public-routes)

Default public prefix:

```
/chatbot

```

Public endpoints:

- `GET /chatbot/widget`
- `GET /chatbot/config`
- `POST /chatbot/message`

Widget Usage
------------

[](#widget-usage)

Add the widget to any Blade template:

```

```

The widget uses published static assets:

```
public/vendor/chatbot/chatbot-widget.css
public/vendor/chatbot/chatbot-widget.js

```

If you need to republish them:

```
php artisan chatbot:publish-assets
```

Configuration
-------------

[](#configuration)

The package config file is published to:

```
config/chatbot.php

```

Important options:

- admin route prefix
- public route prefix
- fallback message
- welcome message
- widget position
- primary color
- enable/disable widget
- conversation logging

To republish config manually:

```
php artisan vendor:publish --tag=chatbot-config
```

Admin Authentication
--------------------

[](#admin-authentication)

This package does not depend on the host app's `users` table.

It uses its own `chatbot_admins` table and a session-based package login flow.

That keeps the chatbot admin isolated from the main application authentication layer.

Questionnaire Management
------------------------

[](#questionnaire-management)

The questionnaire section supports:

- create, edit, and delete question/answer pairs
- category assignment
- active/inactive status
- keyword matching
- sort order
- search and filtering
- CSV import/export

CSV Import/Export
-----------------

[](#csv-importexport)

Questionnaire import expects this CSV header:

```
question,answer,keywords,category,status,sort_order

```

Example:

```
"What are your hours?","We are open 9 AM to 6 PM.","hours,time,open","General","active","1"

```

Behavior:

- existing questions are updated by `question`
- missing categories can be created automatically
- `status` can use values like `active`, `inactive`, `true`, `false`, `1`, `0`

Unanswered Questions
--------------------

[](#unanswered-questions)

If the chatbot cannot match a question strongly enough:

- it returns the fallback message
- it logs the user prompt to `chatbot_unanswered_questions`

The admin can review those prompts at:

```
/chatbot-admin/unanswered-questions

```

From there, the admin can:

- convert a failed prompt into a questionnaire entry
- assign a category
- add keywords
- dismiss it

Analytics
---------

[](#analytics)

Analytics are available at:

```
/chatbot-admin/analytics

```

Current analytics include:

- total conversations in a period
- resolved failures
- pending failures
- daily conversation counts
- top matched questions
- top failed questions

Available Artisan Commands
--------------------------

[](#available-artisan-commands)

```
php artisan chatbot:install
php artisan chatbot:create-admin {username}
php artisan chatbot:reset-password {username}
php artisan chatbot:publish-assets
```

Manual Publish Commands
-----------------------

[](#manual-publish-commands)

If you need manual publish steps instead of `chatbot:install`:

```
php artisan vendor:publish --tag=chatbot-config
php artisan vendor:publish --tag=chatbot-migrations
php artisan chatbot:publish-assets
php artisan migrate
```

Using In Another Laravel App Before Packagist
---------------------------------------------

[](#using-in-another-laravel-app-before-packagist)

If the package is not yet published on Packagist, you can still use it through a local path repository.

In the target Laravel app's `composer.json`:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "/absolute/path/to/laravel_chatbot"
    }
  ]
}
```

Then install:

```
composer require sakibulrasel/laravel-chatbot:*
php artisan chatbot:install
```

Publishing To Packagist
-----------------------

[](#publishing-to-packagist)

Typical release flow:

```
git add .
git commit -m "Initial package release"
git push origin main
git tag v0.1.0
git push origin v0.1.0
```

Then submit the GitHub repository to [Packagist](https://packagist.org/).

After Packagist indexes the package, users can install it with:

```
composer require sakibulrasel/laravel-chatbot
```

Local Workbench
---------------

[](#local-workbench)

This repository includes a local Testbench workbench app for package verification.

Build it:

```
composer build
```

Serve it:

```
composer serve
```

Open:

- `http://127.0.0.1:8000`
- `http://127.0.0.1:8000/chatbot-admin/login`

Default workbench admin credentials:

```
username: admin
password: password

```

Testing
-------

[](#testing)

Run the package tests with:

```
composer test
```

Current Scope
-------------

[](#current-scope)

This package currently provides a stable first version of:

- admin auth
- widget
- questionnaires and categories
- unanswered review
- analytics
- CSV import/export

Still reasonable future additions:

- AI drivers
- richer dashboard charts
- multi-tenant support
- improved widget customization
- more extensive test coverage

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c622eb02e9566e2cce9fe0b06d03c5c1d14c79c58084ccf469979826db8d269d?d=identicon)[sakibulrasel](/maintainers/sakibulrasel)

---

Top Contributors

[![sakibulrasel](https://avatars.githubusercontent.com/u/39976660?v=4)](https://github.com/sakibulrasel "sakibulrasel (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sakibulrasel-laravel-chatbot/health.svg)

```
[![Health](https://phpackages.com/badges/sakibulrasel-laravel-chatbot/health.svg)](https://phpackages.com/packages/sakibulrasel-laravel-chatbot)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k30.2M151](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
