Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Driver Web Laravel Package

botman/driver-web

Web driver for BotMan that connects PHP chatbots to websites, handling incoming browser messages and sending replies. Add interactive chatbot conversations to Laravel or PHP apps with a simple, framework-friendly integration.

Deep Wiki
Context7

botman/driver-web provides the official Web driver for BotMan, letting you run chatbot conversations directly on a website. It supplies the messaging endpoint and frontend widget needed to send user messages to your bot and return replies, so you can add a chat interface without building a custom transport layer.

  • Drop-in web chat widget for embedding a bot on any page
  • AJAX-powered messaging between browser and BotMan
  • Compatible with BotMan conversations and middleware
  • Configurable endpoint and widget options
  • Works well with Laravel and BotMan Studio
Frequently asked questions about Driver Web
How do I install botman/driver-web in a Laravel application?
Install it with Composer alongside botman/botman, then register the WebDriver with BotMan and point it at a route in your Laravel app. In practice this is a sub-day effort: Composer require, a route registration, and a widget embed. Because the last release was 2018-03-27, make your first step a clean-room install on the target Laravel version and treat an unresolvable dependency conflict as a kill criterion.
Which Laravel and PHP versions does botman/driver-web support?
The package belongs to the BotMan 2.x era, which targeted PHP 7.1 to 7.3 and fits cleanly on PHP 7.4 or 8.0 with Laravel 6 to 8. On Laravel 9, 10, or 11 you inherit Symfony 6+ constraints that can force --ignore-platform-reqs or constraint overrides, both of which are unacceptable in a maintained application. Confirm resolution with a spike before committing.
Do I need the bundled JavaScript widget, or can I build my own front end?
The package ships a ready-to-use JavaScript widget, but those assets date from 2018 and will likely need CSP exceptions or re-bundling. Many teams use only the JSON endpoint and post to it from a current front end, which removes most of the risk. If you go that route, a small custom controller can replace the shipped widget entirely.
How do I register the BotMan web endpoint route in Laravel?
The driver exposes a JSON endpoint that the browser widget posts to, so you register a route in routes/web.php or routes/api.php that boots BotMan with the WebDriver and calls listen. Apply the middleware stack that matches your front end, and add throttling from the start. Keep the route same-origin where possible to simplify CSRF and CORS handling.
Is botman/driver-web still maintained?
No. The last release was 2018-03-27, the package has roughly 86 stars, and BotMan core itself shows very low activity, so there is no realistic security response capability. The repository is also listed as unknown, so verify the Packagist dist hash against a named public source repo before adoption. Pin exact versions of botman/botman, botman/driver-web, and transitive Symfony packages in composer.lock and exclude them from automated bumps.
How do I secure the BotMan web chat endpoint in production?
The endpoint is public and unauthenticated by default, so add Laravel rate limiting, input validation, and message size caps before anything else. Escape bot responses before rendering them in the widget, especially when replies are LLM-generated or echo user input. Review the 2018 widget bundle against your CSP and current browser matrix, and consider replacing it with a first-party front end.
How does the web driver handle conversation state and multi-turn conversations?
State lives in BotMan core, not in the driver; the driver is a thin HTTP transport layered on BotMan's middleware and hearing pipeline, so intent matching and NLU calls stay in core. Single-turn FAQ and lead-capture bots need nothing extra. Multi-turn conversations need session-backed state, which constrains horizontal scaling, so plan a shared store such as Redis or the database rather than file sessions.
Can botman/driver-web work with an LLM or NLU backend?
Yes. BotMan middleware can call an NLU or LLM service, and the web driver simply delivers browser messages into that pipeline. That makes the public endpoint a prompt-injection path into your model, so cap message size, validate payloads, and never render model output into the widget without escaping. You also own the cost and latency budget for whatever backend you attach.
What are the alternatives to botman/driver-web for a Laravel chat widget?
You can write a roughly 100-line custom controller that accepts JSON from your front end and dispatches to BotMan or your own handler directly, which removes most of the package risk. Other options are a maintained Livewire or chat widget component, or a hosted support-chat product. If you stay on BotMan, define an internal transport interface and isolate the widget behind a Blade component so swapping the driver is a one-class change.
How do I test the BotMan web driver endpoint?
Write Laravel feature tests that post JSON payloads to the endpoint and assert the reply content, and unit test your conversation handlers separately. Add negative tests for oversized and malformed payloads so validation and throttling paths are covered. The shipped JavaScript widget itself is awkward to test, so treat the endpoint as the contract and verify the widget manually across your browser matrix.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager