Download the PHP package bootdesk/chat-sdk-laravel without Composer
On this page you can find all versions of the php package bootdesk/chat-sdk-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bootdesk/chat-sdk-laravel
More information about bootdesk/chat-sdk-laravel
Files in bootdesk/chat-sdk-laravel
Package chat-sdk-laravel
Short Description Laravel integration for the PHP Chat SDK
License MIT
Informations about the package chat-sdk-laravel
bootdesk/chat-sdk-laravel
Laravel integration for laravel-bootdesk.
Install
Setup
This publishes config/chat.php to your application.
Configuration
The published config/chat.php file contains the following sections:
Webhook Routes
Register a webhook route for incoming platform events:
The {adapter} segment matches the keys in your config/chat.php adapters array (e.g. slack, telegram, discord).
Handlers
Create a handler class to respond to messages:
Register it in config/chat.php:
Or scoped to a specific adapter group:
When a webhook arrives for slack, both global and slack group handlers are registered. telegram group handlers are skipped.
Multiple Groups per Channel
Override resolveGroups on the WebhookController to route channels to different handler groups — even combining multiple groups:
Then ChatFactory::forGroups(['slack', 'internal-support']) merges global handlers + handlers from both groups. Groups are serialized as the chat_groups PSR-7 attribute — they survive into async queue jobs automatically.
Handlers that Inspect the Request
Implement ChatHandlerWithRequest to access the PSR-7 request during registration:
The factory auto-detects which interface the handler implements — existing ChatHandler implementations continue working unchanged.
Middleware
Middleware intercept messages at different stages. Register in your handler class:
Operations: post, edit, postEphemeral
Transcripts
Per-user message persistence stored via the Laravel cache. Incoming and outgoing messages are auto-recorded when configured.
Setup
Bind an IdentityResolver and set transcripts config:
Custom implementation
Override the TranscriptsApi binding in any service provider:
Usage
Multi-Tenant Adapter Resolution
For multi-tenant applications where each tenant has their own bot credentials, use an AdapterResolver:
Register the resolver in a service provider:
Resolution order: Tenant-specific (resolver) → Global (config). Tenants can override specific adapters while falling back to global defaults for others.
Injecting ChatFactory
To send messages programmatically, inject ChatFactory and get a Chat instance:
Or for adapter-specific handlers:
For multiple groups:
Artisan Commands
| Command | Description |
|---|---|
php artisan chat:list |
List configured adapters |
php artisan chat:install |
Publish config file |
Queue Processing
The package binds QueueConcurrencyHandler as the default ConcurrencyHandler. It dispatches jobs as follows: drop acquires a lock during the webhook (dispatches ProcessMessageJob if acquired, drops silently if held — lock released when job finishes); queue and concurrent dispatch ProcessMessageJob; debounce dispatches ProcessDebouncedMessageJob (unique delayed job). The debounce job caches the latest message and a :last timestamp; on re-dispatch it does not restore :last — preventing infinite re-dispatch loops. :latest and :skipped restoration is guarded against overwriting concurrent webhook data. RequiresSyncResponse adapters always process inline (within the HTTP request) regardless of strategy.
When the original PSR-7 webhook request is available, QueueConcurrencyHandler serializes it into a RequestContext value object (method, URI, headers, body, query/parsed/server params, cookies, version, requestAttributes) and passes it to every dispatched job. Both ProcessMessageJob and ProcessDebouncedMessageJob reconstruct the PSR-7 request and pass it to Chat::resolveAdapter() — so AdapterResolver::resolve($name, $request) receives the original request in both sync and queued contexts. The requestAttributes field captures PSR-7 getAttributes() — extend WebhookController to add tenant/context attributes that survive into jobs.
Make sure your Laravel queue worker is running:
No manual setup is needed beyond configuring your queue driver in config/queue.php.
State
State persistence uses the Laravel Cache facade. The cache store is resolved from the facade at runtime — configure it in config/cache.php as usual.
Error Handling
Adapter exceptions bubble up to Laravel's exception handler. Register custom handlers in app/Exceptions/Handler.php:
Exception types:
AuthenticationException— Invalid credentials/tokensRateLimitException— Platform rate limit exceededAdapterException— Generic adapter errorsResourceNotFoundException— Adapter/thread not foundValidationException— Invalid input data
Documentation
Full API documentation: https://bootdesk.github.io/chat-sdk
License
MIT
All versions of chat-sdk-laravel with dependencies
bootdesk/chat-sdk-core Version 0.4.45
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
symfony/psr-http-message-bridge Version ^5.4|^6.0|^6.4|^7.0|^8.0
nyholm/psr7 Version ^1.0