PHPackages                             jeffersongoncalves/laravel-whatsapp-widget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. jeffersongoncalves/laravel-whatsapp-widget

ActiveLibrary[Templating &amp; Views](/categories/templating)

jeffersongoncalves/laravel-whatsapp-widget
==========================================

This Laravel package provides a simple yet customizable WhatsApp widget for your website. It allows you to easily add a clickable WhatsApp button or floating widget to connect visitors directly with your WhatsApp account. The widget is designed to be easily integrated into your Laravel application and is fully customizable to match your website's design.

v1.4.1(2mo ago)42.6k↓50%1MITCSSPHP ^8.2|^8.3CI passing

Since Mar 2Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jeffersongoncalves/laravel-whatsapp-widget)[ Packagist](https://packagist.org/packages/jeffersongoncalves/laravel-whatsapp-widget)[ Docs](https://github.com/jeffersongoncalves/laravel-whatsapp-widget)[ RSS](/packages/jeffersongoncalves-laravel-whatsapp-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (11)Used By (1)

[![Laravel Whatsapp Widget](https://raw.githubusercontent.com/jeffersongoncalves/laravel-whatsapp-widget/master/art/jeffersongoncalves-laravel-whatsapp-widget.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-whatsapp-widget/master/art/jeffersongoncalves-laravel-whatsapp-widget.png)

Laravel Whatsapp Widget
=======================

[](#laravel-whatsapp-widget)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dbd6b6964432fddb504248325ed35f05eaf33c35b89ac052b3713b2fb92182f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d77686174736170702d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-whatsapp-widget)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e96390a4c96b7d205139ead91dd5c9fe3439c69a5ae46bfa7f708280556e63f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d77686174736170702d7769646765742f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-whatsapp-widget/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7c58e4a3ab528352d8162183a3b016a77a6b4f0f962a96bf4eacd4cabf9bb9f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d77686174736170702d7769646765742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-whatsapp-widget/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/1ef735687b4342291ae9f8ee63525c02a6d9f901e6aebb2832dd3c1cdb5d34b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d77686174736170702d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-whatsapp-widget)

This Laravel package provides a simple yet customizable WhatsApp widget for your website. It allows you to easily add a clickable WhatsApp button or floating widget to connect visitors directly with your WhatsApp account. The widget is designed to be easily integrated into your Laravel application and is fully customizable to match your website's design.

Features
--------

[](#features)

- 🚀 **Multi-agent support**: Add multiple WhatsApp agents with different phone numbers and names
- 🎨 **Customizable appearance**: Change the widget's position, colors, and text
- 🔊 **Audio notifications**: Optional sound alert when the widget loads (configurable)
- 📱 **Mobile-friendly**: Responsive design that works on all devices
- 🌐 **Localization support**: Easily translate the widget to any language
- 🔄 **Pre-defined messages**: Set default text messages for each agent
- 🖼️ **Custom agent avatars**: Add profile pictures for each agent

Screenshots
-----------

[](#screenshots)

### Widget Position: Right (Default)

[](#widget-position-right-default)

ClosedOpen[![Widget Position Right](screenshots/whatsapp-widget-bottom-right.png)](screenshots/whatsapp-widget-bottom-right.png)[![Widget Position Right Open](screenshots/whatsapp-widget-bottom-right-open-widget.png)](screenshots/whatsapp-widget-bottom-right-open-widget.png)### Widget Position: Left

[](#widget-position-left)

ClosedOpen[![Widget Position Left](screenshots/whatsapp-widget-bottom-left.png)](screenshots/whatsapp-widget-bottom-left.png)[![Widget Position Left Open](screenshots/whatsapp-widget-bottom-left-open-widget.png)](screenshots/whatsapp-widget-bottom-left-open-widget.png)### Redirect Page

[](#redirect-page)

[![Redirect Page](screenshots/whatsapp-widget-redirect-page.png)](screenshots/whatsapp-widget-redirect-page.png)

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.0 or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jeffersongoncalves/laravel-whatsapp-widget
```

Usage
-----

[](#usage)

### 1. Publish the package assets

[](#1-publish-the-package-assets)

Publish config file:

```
php artisan vendor:publish --tag=whatsapp-widget-config
```

Publish migration file:

```
php artisan vendor:publish --tag=whatsapp-widget-migrations
```

Publish assets files:

```
php artisan vendor:publish --tag=whatsapp-widget-assets
```

Publish translations files:

```
php artisan vendor:publish --tag=whatsapp-widget-translations
```

Publish views files:

```
php artisan vendor:publish --tag=whatsapp-widget-views
```

### 2. Run the migrations

[](#2-run-the-migrations)

```
php artisan migrate
```

### 3. Add the widget to your layout

[](#3-add-the-widget-to-your-layout)

Add the head template in your layout's `` section:

```
@include('whatsapp-widget::whatsapp-widget-head')
```

Add the body template before the closing `` tag:

```
@include('whatsapp-widget::whatsapp-widget-body')
```

### 4. Add WhatsApp agents

[](#4-add-whatsapp-agents)

You need to add WhatsApp agents to your database. You can do this through your application's admin panel or by creating a seeder.

Example seeder:

```
use JeffersonGoncalves\WhatsappWidget\Models\WhatsappAgent;

WhatsappAgent::create([
    'active' => true,
    'name' => 'Customer Support',
    'phone' => '+1234567890',
    'text' => 'Hello! I have a question about your product.',
    'image' => 'path/to/agent-avatar.jpg', // Optional
]);
```

Configuration
-------------

[](#configuration)

After publishing the configuration file, you can customize the widget by editing the `config/whatsapp-widget.php` file:

```
return [
    // Enable or disable audio notification
    'audio' => true,

    // Play audio notification once per day or on every page load
    'play_audio_daily' => true,

    // Filesystem disk for storing agent images
    'disk' => env('FILESYSTEM_DISK', 'local'),

    // Application URL (used for redirection)
    'url' => env('APP_URL', 'http://localhost'),

    // Application name (displayed in the widget)
    'name' => env('APP_NAME', 'Laravel App'),

    // WhatsApp API key (if needed)
    'key' => env('WHATSAPP_KEY'),

    // Widget position on the screen (left or right)
    'position' => 'right',
];
```

Customization
-------------

[](#customization)

### Translations

[](#translations)

The package currently supports the following languages:

- 🇸🇦 **Arabic** (`ar`)
- 🇨🇿 **Czech** (`cs`)
- 🇩🇪 **German** (`de`)
- 🇺🇸 **English** (`en`)
- 🇪🇸 **Spanish** (`es`)
- 🇮🇷 **Persian** (`fa`)
- 🇫🇷 **French** (`fr`)
- 🇮🇱 **Hebrew** (`he`)
- 🇮🇩 **Indonesian** (`id`)
- 🇮🇹 **Italian** (`it`)
- 🇯🇵 **Japanese** (`ja`)
- 🇳🇱 **Dutch** (`nl`)
- 🇵🇱 **Polish** (`pl`)
- 🇵🇹 **Portuguese** (`pt`)
- 🇧🇷 **Portuguese (Brazil)** (`pt_BR`)
- 🇵🇹 **Portuguese (Portugal)** (`pt_PT`)
- 🇸🇰 **Slovak** (`sk`)
- 🇹🇷 **Turkish** (`tr`)

You can customize the widget's text by editing the translation files in `resources/lang/vendor/whatsapp-widget/`.

### Position

[](#position)

By default, the widget appears in the bottom-right corner of the page. You can change this by modifying the `position` value in the `config/whatsapp-widget.php` file.

Example for left position:

```
'position' => 'left',
```

ClosedOpen[![Widget Position Left](screenshots/whatsapp-widget-bottom-left.png)](screenshots/whatsapp-widget-bottom-left.png)[![Widget Position Left Open](screenshots/whatsapp-widget-bottom-left-open-widget.png)](screenshots/whatsapp-widget-bottom-left-open-widget.png)Example for right position:

```
'position' => 'right',
```

ClosedOpen[![Widget Position Right](screenshots/whatsapp-widget-bottom-right.png)](screenshots/whatsapp-widget-bottom-right.png)[![Widget Position Right Open](screenshots/whatsapp-widget-bottom-right-open-widget.png)](screenshots/whatsapp-widget-bottom-right-open-widget.png)### Redirect Page

[](#redirect-page-1)

When a user clicks on an agent, they are redirected to a temporary page before being sent to WhatsApp. This page can be customized by publishing the package views.

[![Redirect Page](screenshots/whatsapp-widget-redirect-page.png)](screenshots/whatsapp-widget-redirect-page.png)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jèfferson Gonçalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance88

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~51 days

Recently: every ~89 days

Total

8

Last Release

83d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (67 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (24 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (5 commits)")

---

Tags

bladechat-widgetcomposerfloating-buttonjeffersongoncalveslaravellaravel-packagephpwhatsappwhatsapp-widgetlaraveljeffersongoncalveslaravel-whatsapp-widget

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-whatsapp-widget/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-laravel-whatsapp-widget/health.svg)](https://phpackages.com/packages/jeffersongoncalves-laravel-whatsapp-widget)
```

###  Alternatives

[ryangjchandler/blade-capture-directive

Create inline partials in your Blade templates with ease.

8222.2M12](/packages/ryangjchandler-blade-capture-directive)[cagilo/cagilo

A set of open-source Blade components for the Laravel Framework

172996.5k](/packages/cagilo-cagilo)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[daikazu/laravel-glider

Start using Glide on-the-fly instantly in your Laravel blade templates.

882.3k](/packages/daikazu-laravel-glider)[combindma/dash-ui

A streamlined and stylish UI component library for Laravel Blade, crafted with TailwindCSS and AlpineJs for simplicity and elegance.

631.4k](/packages/combindma-dash-ui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
