Looking to hire Laravel developers? Try LaraJobs

laravel-chatbot maintained by aanfarhan

Description
Context-aware chatbot package for Laravel: signed page context, OpenAI-compatible LLMs, streaming SSE, GDPR-friendly persistence.
Author
Last update
2026/06/04 01:37 (dev-main)
License
Links
Downloads
37
Tags

Comments
comments powered by Disqus

Laravel AI Chatbot Widget

A Composer package that drops a context-aware chatbox onto any Laravel page. Declare what data the chat should see in your controller; the package handles signing, streaming, persistence, tool calling, and the frontend widget.

📚 Full documentation: aanfarhan.github.io/laravel-chatbot

Requirements

  • PHP 8.2+
  • Laravel 11 or 12
  • An OpenAI-compatible LLM provider (OpenAI, Azure, OpenRouter, Groq, Ollama, etc.)

Install

composer require aanfarhan/laravel-chatbot
php artisan chatbot:install

Use

use Aanfarhan\Chatbot\Facades\Chatbot;

Route::get('/orders/{order}', function (Order $order) {
    Chatbot::context(['order' => new OrderResource($order)]);

    return view('orders.show', compact('order'));
})->name('orders.show');
<body>
    @yield('content')
    @chatbot
</body>

That's it. For everything else — channels, tool calling, client extractors, theming, GDPR, security, the full reference — see the documentation site.

Links

License

MIT