spatie/laravel-support-bubble
Add a non-intrusive support chat bubble to any Laravel page. Opens a Tailwind-styled support form, auto-fills user info when logged in, includes URL/IP metadata, honeypot spam protection, and is easily customizable via views, translations, and events.
spatie/laravel-honeypot for spam protection (adds ~1KB to frontend).| Risk Area | Severity | Mitigation |
|---|---|---|
| Frontend Styling Conflicts | Medium | Test with existing CSS frameworks (Bootstrap, Bulma) or isolate styles via shadow DOM. |
| Form Submission Logic | Low | Customize SupportBubbleService to route submissions to your preferred storage (e.g., database, API). |
| Performance Overhead | Low | Bundle size is minimal (~50KB gzipped). Monitor Lighthouse scores post-integration. |
| SEO/Accessibility | Medium | Ensure chat bubble is hidden from screen readers (use aria-hidden) and doesn’t block critical content. |
| Spam Handling | Low | Honeypot is pre-configured, but monitor false positives in production. |
Pre-Integration:
Schema::create('support_tickets', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('email')->nullable();
$table->text('message');
$table->string('ip_address');
$table->string('url');
$table->timestamps();
});
POST /support-tickets).Installation:
composer require spatie/laravel-support-bubble
php artisan vendor:publish --provider="Spatie\SupportBubble\SupportBubbleServiceProvider"
.env for honeypot settings.Blade Integration: Add the bubble to layouts/master Blade files:
@supportBubble
Customize via config (e.g., bubble position, trigger conditions).
Backend Logic:
Extend the SupportBubbleService to handle submissions:
// app/Providers/SupportBubbleServiceProvider.php
public function boot()
{
SupportBubble::supportTicketCreated(function (SupportTicket $ticket) {
// Store in DB or forward to an API
SupportTicket::create($ticket->toArray());
});
}
Testing:
composer.json for exact range).resources/views/vendor/support-bubble/bubble.blade.php.Phase 1 (1–2 days):
Phase 2 (1–3 days):
Phase 3 (Ongoing):
composer update and testing.config('support-bubble')).How can I help you explore Laravel packages today?