{"id":15025041,"url":"https://github.com/spatie/laravel-support-bubble","last_synced_at":"2026-02-27T01:08:27.532Z","repository":{"id":41876209,"uuid":"397376488","full_name":"spatie/laravel-support-bubble","owner":"spatie","description":"A non-intrusive support form that can be displayed on any page","archived":false,"fork":false,"pushed_at":"2025-05-12T04:19:26.000Z","size":195,"stargazers_count":371,"open_issues_count":0,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-12T05:26:56.689Z","etag":null,"topics":["form","laravel","php","support"],"latest_commit_sha":null,"homepage":"https://spatie.be/open-source","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"spatie"}},"created_at":"2021-08-17T19:57:31.000Z","updated_at":"2025-05-12T04:19:24.000Z","dependencies_parsed_at":"2023-02-16T03:55:24.993Z","dependency_job_id":"d993ab5c-70fe-4e3f-a040-14a4fee3368e","html_url":"https://github.com/spatie/laravel-support-bubble","commit_stats":{"total_commits":175,"total_committers":19,"mean_commits":9.210526315789474,"dds":0.52,"last_synced_commit":"e8ae71ae5e6a12721912862db8029a02faff0efe"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-support-bubble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-support-bubble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-support-bubble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-support-bubble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/laravel-support-bubble/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253682869,"owners_count":21947026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["form","laravel","php","support"],"created_at":"2024-09-24T20:01:26.661Z","updated_at":"2026-02-27T01:08:27.500Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":["https://github.com/sponsors/spatie"],"categories":[],"sub_categories":[],"readme":"# A non-intrusive support bubble that can be displayed on any page\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-support-bubble.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-support-bubble)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-support-bubble.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-support-bubble)\n\nUsing this package you can quickly add a chat bubble that opens a support form on any page. It comes with batteries included:\n\n- TailwindCSS styling out of the box\n- Won't ask user information if there's a logged in user\n- Includes some meta data like URL and IP address\n- Easily extendable using custom views, language files and event listeners\n- Honeypot included and set-up to keep spammers at bay\n\nYou can see it in action below, on [Flare](https://flareapp.io/) and [Oh Dear](https://ohdear.app)!\n\n![support-small](https://user-images.githubusercontent.com/6287961/130991221-831879ee-1a90-46f3-a92d-af0e7a30d022.gif)\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/laravel-support-bubble.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/laravel-support-bubble)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Are you a visual learner?\n\nIn [this stream on YouTube](https://www.youtube.com/watch?v=IucDLJI2mvQ), you'll see how to install that package, and how it works under the hood.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require spatie/laravel-support-bubble\n```\n\n#### Include TailwindCSS\n\nThe views included in this package all use TailwindCSS classes. We've stuck to the default Tailwind config classes.  If you're not already using TailwindCSS, you can easily include it from their CDN:\n\n```html\n\u003clink href=\"https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css\" rel=\"stylesheet\"\u003e\n```\n\nIf you use Tailwind [Just-in-Time Mode](https://tailwindcss.com/docs/just-in-time-mode) you should add these additional lines into your `tailwind.config.js` file:\n```js\ncontent: [\n    './vendor/spatie/laravel-support-bubble/config/**/*.php',\n    './vendor/spatie/laravel-support-bubble/resources/views/**/*.blade.php',\n    // other places\n],\n```\n\nThis way Tailwind JIT will build your styles including those properties used for the support bubble.\n\n#### Add the component to your view\n\nAfter installing the package, you need to add this Blade component in your relevant view files:\n\n```html\n\u003cx-support-bubble /\u003e\n```\n\nIf you want it to show up on all pages you can add it to your `layout.blade.php` file.\n\nNext, you need to register the support form's route. Add the following macro in your `routes/api.php` file:\n\n```php\nRoute::supportBubble();\n```\n\nThis will register a route at `/support-bubble`\n\n⚠️ This package is not using CSRF tokens so make sure you add the route macro to your apps API routes or add an exclusion in the `VerifyCsrfToken` middleware.\n\n```php\n// in app/Http/Middleware/VerifyCsrfToken.php\n\nnamespace App\\Http\\Middleware;\n\nuse Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken as Middleware;\n\nclass VerifyCsrfToken extends Middleware\n{\n    protected $except = [\n        'support-bubble',\n        // other entries\n    ];\n    \n    // ...\n}\n```\n\nIn Laravel 11 this is done in `bootstrap/app.php`:\n```\n-\u003ewithMiddleware(function (Middleware $middleware) {\n        $middleware-\u003evalidateCsrfTokens(except: [\n\t\t\t'support-bubble',\n\t\t]);\n    })\n```\n#### Configure message destination\n\nFinally, you need to decide where you want to send the support bubble's submission to. \n\nOut of the box, the package can mail the submissions to a given email address. To go this route, publish the config file and enter the email in `mail_to`.\n\nAlternately, you can register an [event listener](https://laravel.com/docs/8.x/events#defining-listeners) to listen for the `Spatie\\SupportBubble\\Events\\SupportBubbleSubmittedEvent` event and handle it yourself. This event has submitted form values as public properties.\n\nThe config file can be published with:\n\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\SupportBubble\\SupportBubbleServiceProvider\" --tag=\"support-bubble-config\"\n```\n\nThese are the default contents of the published config file:\n\n```php\n\u003c?php\n\nreturn [\n    /*\n     * Enable or disable fields in the support bubble.\n     * Keep in mind that `name` and `email` will be hidden automatically\n     * when a logged in user is detected and `prefill_logged_in_user` is set.\n     */\n    'fields' =\u003e [\n        'name' =\u003e true,\n        'email' =\u003e true,\n        'subject' =\u003e true,\n        'message' =\u003e true,\n    ],\n    \n    /*\n     * We'll send any chat bubble responses to this e-mail address.\n     *\n     * Set this to\n     */\n    'mail_to' =\u003e null,\n\n    /*\n     * When set to true we'll use currently logged in user to fill in\n     * the name and email fields. Both fields will also be hidden.\n     */\n    'prefill_logged_in_user' =\u003e true,\n\n    /*\n     * The TailwindCSS classes used on a couple of key components.\n     *\n     * To customize the components further, you can publish\n     * the views of this package.\n     */\n    'classes' =\u003e [\n        'container' =\u003e 'text-base items-end z-10 flex-col m-4 gap-3',\n        'bubble' =\u003e 'hidden sm:block | bg-purple-400 rounded-full shadow-lg w-14 h-14 text-white p-4',\n        'input' =\u003e 'bg-gray-100 border border-gray-200 w-full max-w-full p-2 rounded-sm shadow-input text-gray-800 text-base',\n        'button' =\u003e 'inline-flex place-center px-4 py-3 h-10 border-0 bg-purple-500 hover:bg-purple-600 active:bg-purple-600 overflow-hidden rounded-sm text-white leading-none no-underline',\n    ],\n    \n    /*\n     * The default route and controller will be registered using this route name.\n     * This is a good place to hook in your own route and controller if necessary.\n     */\n    'form_action_route' =\u003e 'supportBubble.submit',\n\n     /**\n     * The positioning of the bubble and the form, change this between right-to-left and left-to-right, if you want to use RTL, you must have your layout set to RTL like this \n     * \u003chtml lang=\"ar-TN\" dir=\"rtl\"\u003e\n     * By default, the value of this is LTR\n     */\n    'direction' =\u003e 'left-to-right',\n];\n```\n\n## Customization options\n\nThe support bubble should look pretty good out of the box. However, we've documented a couple ways to customize labels, text, views and functionality.\n\n### Customizing form fields\n\nIt is currently not possible to add new fields to the support bubble's form. You can however disable any fields you do not like in the config file.\n\n### Customizing text / localisation\n\nIf you're just looking to customize the field labels, intro text or success text (after the form submitted), you can publish the package's language files:\n\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\SupportBubble\\SupportBubbleServiceProvider\" --tag=support-bubble-translations\n```\n\nThese published files can be found and changed in `resources/lang/vendor/laravel-support-bubble/en/`.\n\n### Customizing styles\n\nYou can customize the TailwindCSS classes used for the bubble pop-up, input fields and submit button by changing the `support-bubble.class` config keys. This is the ideal place to change the bubble's default purple color or use your own `.input` or `.button` classes.\n\nIf you're looking to change any more advanced styles, keep reading to learn how to publish and customize the Blade views used in the support bubble component.\n \n### Customizing views\n\nYou can publish and change all views (including the JavaScript code) in this package:\n\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\SupportBubble\\SupportBubbleServiceProvider\" --tag=support-bubble-views\n```\nThese published views can be found and changed in `resources/views/vendor/laravel-support-bubble/`.\n\nPlease keep in mind that it's not possible (or at least pretty difficult and convoluted) to add new fields to the support bubble.\n\n### Customizing support form destination\n\nIf you don't want to send the support messages to the `mail_to` email configured in the config file, you can define your own [event listener](https://laravel.com/docs/8.x/events#defining-listeners) and listen for the `Spatie\\SupportBubble\\Events\\SupportBubbleSubmittedEvent`. The event contains all data submitted in the support form and can be used to, for example, make an API request to Freshdesk.\n\n### Customizing behaviour after submitting (advanced)\n\nIf you really want to, you can send the submitted form data to your own endpoint. The support form uses the route configured in the `support-bubble.form_action_route` config key. You can override this route by removing the `Route::supportBubble()` macro from your routes file and setting the `form_action_route` to any other route name in your application.\n\nThe incoming request on this route will be a `\\Spatie\\SupportBubble\\Http\\Requests\\SupportBubbleRequest`.\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Alex Vanderbist](https://github.com/alexvanderbist)\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [Ruben Van Assche](https://github.com/rubenvanassche)\n- [All Contributors](../../contributors)\n\n## Alternatives\n\nIf you need more options for your support bubble, consider using one of these:\n\n- [Freddy Feedback](https://freddyfeedback.com)\n- [Beacon by Help Scout](https://www.helpscout.com)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-support-bubble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Flaravel-support-bubble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-support-bubble/lists"}