PHPackages                             designbycode/laravel-brevo - 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. [API Development](/categories/api)
4. /
5. designbycode/laravel-brevo

ActivePackage[API Development](/categories/api)

designbycode/laravel-brevo
==========================

wrapper for brevo-php

1.1.1(1y ago)021[5 PRs](https://github.com/designbycode/laravel-brevo/pulls)MITPHPPHP ^8.2||^8.3||^8.4CI passing

Since Jan 22Pushed 2mo agoCompare

[ Source](https://github.com/designbycode/laravel-brevo)[ Packagist](https://packagist.org/packages/designbycode/laravel-brevo)[ Docs](https://github.com/designbycode/laravel-brevo)[ GitHub Sponsors](https://github.com/Designbycode)[ RSS](/packages/designbycode-laravel-brevo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (10)Used By (0)

Overview
--------

[](#overview)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9f5a42f3151d4b49b90a6cbfd1549334d7e12432946382de163534bf0fd9eccb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64657369676e6279636f64652f6c61726176656c2d627265766f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/designbycode/laravel-brevo)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9a6c22df6bfc356718e3e38d13e6d7d2bdf7e92793fd16918835dfabb38a7a73/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64657369676e6279636f64652f6c61726176656c2d627265766f2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/designbycode/laravel-brevo/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/beef913f7e72b02b546f15a5c5742c77abe3aaeb37bf1e7ce000a820b58ce6e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64657369676e6279636f64652f6c61726176656c2d627265766f2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/designbycode/laravel-brevo/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ab01c6aca1411d3a7f6f74f1671e6881831656a37200dba2dcb7b054a8799753/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64657369676e6279636f64652f6c61726176656c2d627265766f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/designbycode/laravel-brevo)

The LaravelBrevo package is a Laravel wrapper for integrating with the Brevo API (formerly Sendinblue). It simplifies interactions with Brevo's email marketing and contact management features, allowing you to manage contacts, subscribe/unsubscribe users, and retrieve contact information seamlessly within your Laravel application.

This version of the documentation demonstrates how to use the package via the Facade for cleaner and more expressive code.

Use Cases
---------

[](#use-cases)

This package is ideal for:

1. Email Marketing:

    - Subscribe users to mailing lists.
    - Unsubscribe users from mailing lists.
    - Update user attributes (e.g., name, preferences).
2. Contact Management:

    - Retrieve contact details.
    - Create or update contacts in Brevo.
3. Automation:

    - Automatically add new users to Brevo lists during registration.
    - Sync user data between your application and Brevo.

Support us
----------

[](#support-us)

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

[](#installation)

You can install the package via composer:

```
composer require designbycode/laravel-brevo
```

You can publish the config file with:

```
php artisan vendor:publish --tag="brevo"
```

Add your Brevo API key to the .env file:

```
BREVO_API_KEY=your-api-key
```

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

[](#configuration)

```
return [
    'api_key' => env('BREVO_API_KEY', ''),
];
```

api\_key: Your Brevo API key. This is required to authenticate API requests.

Usage
-----

[](#usage)

### Retrieve Contact Information.

[](#retrieve-contact-information)

To retrieve details for a specific contact by email:

```
use Designbycode\LaravelBrevo\Facades\Brevo;

if ($contact = Brevo::getContactInfo('test@example.com')) {
    echo "Contact Name: " . $contact->getAttributes()->name;
} else {
    echo "Contact not found.";
}
```

### Subscribe a Contact

[](#subscribe-a-contact)

To subscribe a contact to a mailing list:

```
use Designbycode\LaravelBrevo\Facades\Brevo;
if ($success = Brevo::subscribe('test@example.com', $listId)) {
    echo "Contact subscribed successfully!";
} else {
    echo "Failed to subscribe contact.";
}
```

### Unsubscribe a Contact

[](#unsubscribe-a-contact)

To unsubscribe a contact from a mailing list:

```
use Designbycode\LaravelBrevo\Facades\Brevo;

if ($success = Brevo::unsubscribe('test@example.com', $listId)) {
    echo "Contact unsubscribed successfully!";
} else {
    echo "Failed to unsubscribe contact.";
}
```

### Methods

[](#methods)

`Brevo::getContactInfo(string $email): ?GetExtendedContactDetails`

- Retrieves contact details for the specified email.
- Returns `null` if the contact is not found.

`Brevo::subscribe(string $email, int $listId, array $attributes = []): bool`

- Subscribes a contact to a mailing list.
- Creates a new contact if they don't exist, or updates an existing contact.
- Returns `true` on success, `false` on failure.

`Brevo::unsubscribe(string $email, int $listId): bool`

- Unsubscribes a contact from a mailing list.
- Returns `true` on success, `false` on failure.

### Error Handling

[](#error-handling)

The package handles API errors gracefully:

- 404 Not Found: Logs a warning and returns `null` or `false`.
- 500 Server Error: Logs an error and returns `false`.
- Other exceptions are logged and handled appropriately.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Claude Myburgh](https://github.com/claudemyburgh)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance67

Regular maintenance activity

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 61.9% 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 ~1 days

Total

4

Last Release

476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65820d809cbae9f6fa2f5984f3c584e97b8fad0824590cf23e36cc8d85166cb2?d=identicon)[claudemyburgh](/maintainers/claudemyburgh)

---

Top Contributors

[![claudemyburgh](https://avatars.githubusercontent.com/u/6057076?v=4)](https://github.com/claudemyburgh "claudemyburgh (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

laraveldesignbycodelaravel-brevo

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/designbycode-laravel-brevo/health.svg)

```
[![Health](https://phpackages.com/badges/designbycode-laravel-brevo/health.svg)](https://phpackages.com/packages/designbycode-laravel-brevo)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.0k7.8M57](/packages/dedoc-scramble)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)[hofmannsven/laravel-brevo

Laravel wrapper for Brevo's API v3 PHP library.

3450.2k](/packages/hofmannsven-laravel-brevo)

PHPackages © 2026

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