PHPackages                             juanparati/trustpilot - 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. juanparati/trustpilot

ActiveLibrary[API Development](/categories/api)

juanparati/trustpilot
=====================

Trustpilot library for Laravel

13.0(3w ago)05.3k↑311.5%1MITPHPPHP &gt;=8.3

Since Sep 30Pushed 3w ago1 watchersCompare

[ Source](https://github.com/juanparati/trustpilot)[ Packagist](https://packagist.org/packages/juanparati/trustpilot)[ Docs](https://github.com/juanparati/trustpilot)[ RSS](/packages/juanparati-trustpilot/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (5)Versions (12)Used By (0)

Laravel Trustpilot library
==========================

[](#laravel-trustpilot-library)

A Trustpilot library for Laravel.

This library is based on [igdwebdev/laravel-trustpilot](https://github.com/igdwebdev/laravel-trustpilot).

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

[](#installation)

You can install the package via composer:

```
composer require juanparati/trustpilot
```

Configuration:

```
artisan vendor:publish --provider="Juanparati\Trustpilot\Providers\TrustpilotServiceProvider"
```

Official Documentation
----------------------

[](#official-documentation)

- [Trustpilot Documentation](https://developers.trustpilot.com/)

Environment Variables
---------------------

[](#environment-variables)

```
TRUSTPILOT_UNIT_ID=
TRUSTPILOT_API_KEY=
TRUSTPILOT_API_SECRET=
TRUSTPILOT_USERNAME=
TRUSTPILOT_PASSWORD=

```

TO-DO
-----

[](#to-do)

- Consumer API
- Consumer Profile API
- Product Reviews API -&gt; Conversations, Invitation Link
- Resources API
- Service Reviews API
- Business Units API (Private Reviews)

Usage
-----

[](#usage)

### Business Unit

[](#business-unit)

```
// Get the first business unit
$businessUnit = Trustpilot::businessUnits()->first();

// Get the 2nd page of business units with 5 per page.
$businessUnits = Trustpilot::businessUnits()
    ->limit(5)
    ->page(2)
    ->get();

// Search for the first business unit with the name 'Trustpilot'
$businessUnit = Trustpilot::businessUnits()
    ->search('Trustpilot')
    ->first();

// Obtain number of reviews.
$businessUnit = Trustpilot::businessUnits()
    ->search('google.com')
    ->first()
    ->load()
    ->numberOfReviews

// Get business unit by id
$businessUnit = Trustpilot::businessUnits()->find('46d6a890000064000500e0c3');

// Get the first business unit's first review
$review = Trustpilot::businessUnits()
    ->first()
    ->reviews()
    ->first();

// Get the logo of the searched business.
$logo = Trustpilot::businessUnits()
    ->search('Trustpilot')
    ->first()
    ->logo();

// Get three of your business reviews ordered by lowest star to highest.
$reviews = Trustpilot::businessUnit()
    ->reviews()
    ->orderBy('stars', 'asc')
    ->limit(3)
    ->get();

// Get one of your business reviews which is one star and has a response.
$review = Trustpilot::businessUnit()
    ->reviews()
    ->where('stars', 1)
    ->where('responded', true)
    ->first();

// Get the review title of 5 of your reviews offseted by 5.
$reviews = Trustpilot::businessUnit()
    ->reviews()
    ->limit(5)
    ->offset(5)
    ->get()
    ->pluck('title');

// Get the the first 10 product reviews of your business that are 4 or 5 stars for the specific products.
$productReviews = Trustpilot::businessUnit()
    ->products()->reviews()
    ->where('sku', [
        'product_1_sku_here',
        'product_2_sku_here',
    ])
    ->where('stars', [4, 5])
    ->limit(10)
    ->get();

// Get the joined product review summary of the two specific products for your business.
$productReviewSummary = Trustpilot::businessUnit()
    ->products()
    ->reviewSummary([
        'product_1_sku_here',
        'product_2_sku_here',
    ]);

// Get the joined product review summary of the two specific products for your business by URL.
$productReviewSummary = Trustpilot::businessUnit()
    ->products()
    ->reviewSummary([], [
        'https://www.example.com/product_1',
        'https://www.example.com/product_2',
    ]);

// Get the aggregated product review summary of the two specific products for your business.
$aggregatedProductReviewSummaries = Trustpilot::businessUnit()
    ->products()
    ->reviewAggregatedSummaries([
        'product_1_sku_here',
        'product_2_sku_here',
    ]);

// Get the batched product review summary of the two specific products for your business.
$productReviewSummaries = Trustpilot::businessUnit()
    ->products()
    ->reviewBatchSummaries([
        'product_1_sku_here',
        'product_2_sku_here',
    ]);

// Get three of your business imported reviews for the given product.
$reviews = Trustpilot::businessUnit()
    ->importedReviews()
    ->where('sku', 'product_sku_here')
    ->limit(3)
    ->get();

// Get five of your business imported reviews for the given products.
$reviews = Trustpilot::businessUnit()
    ->importedReviews()
    ->where('sku', [
        'product_1_sku_here',
        'product_2_sku_here',
    ])
    ->limit(5)
    ->get();

// Get the joined imported product review summary of the two specific products for your business.
$productReviewSummary = Trustpilot::businessUnit()
    ->products()
    ->importedReviewSummary([
        'product_1_sku_here',
        'product_2_sku_here',
    ]);

// Get the joined imported product review summary of the specific product for your business.
$productReviewSummary = Trustpilot::businessUnit()
    ->products()
    ->importedReviewSummary('product_1_sku_here');

// Get the web links of your business.
$webLinks = Trustpilot::businessUnit()->webLinks();

// Get the logo of your business.
$logo = Trustpilot::businessUnit()->logo();

// Get the customer guarantee of your business.
$customerGuarantee = Trustpilot::businessUnit()->customerGuarantee();

// Get the images of your business.
$images = Trustpilot::businessUnit()->images();

// Get the profile of your business.
$profile = Trustpilot::businessUnit()->profile();

// Get the promotion of your business.
$promotion = Trustpilot::businessUnit()->promotion();
```

### Products

[](#products)

```
// Get all products.
$products = Trustpilot::products()->get();

// Get the product with a sku of "samsung-galaxy-s10".
$product = Trustpilot::products()
    ->where('skus', 'samsung-galaxy-s10')
    ->first();

// Get all products with a sku of "samsung-galaxy-s8", "samsung-galaxy-s9" or "samsung-galaxy-s10".
$products = Trustpilot::products()
    ->where('skus', ['samsung-galaxy-s8', 'samsung-galaxy-s9', 'samsung-galaxy-s10'])
    ->get();

// Updating a product.
$product = Trustpilot::products()
    ->where('skus', 'samsung-galaxy-s10')
    ->first();
$product->title = 'Samsung Galaxy S10';
$product->price = '9.99';
$product->currency = 'USD';
$product->save();
```

### Inivitations

[](#inivitations)

```
// Create a service invitation to John Doe from Business Name now.
Trustpilot::businessUnit()->invitation()->service(
    '#123456', 'John Doe', 'john.doe@example.com',
    'no-reply@business.com', 'Business Name'
);

// Create a service invitation to John Doe from Business Name now to be sent
// in 5 days using a custom template id and to redirect to our website afterwards.
Trustpilot::businessUnit()->invitation()->service(
    '#123456', 'John Doe', 'john.doe@example.com',
    'no-reply@business.com', 'Business Name', 'support@business.com',
    now()->addDays(5), '507f191e810c19729de860ea',
    'https://example.com/',
);

// Create a product and service invitation from product skus.
Trustpilot::businessUnit()->invitation()->products(
    ['samsung-galaxy-s8', 'samsung-galaxy-s9', 'samsung-galaxy-s10'],
    '#123456', 'John Doe', 'john.doe@example.com',
    'no-reply@business.com', 'Business Name'
);

// Create a product and service invitation from products.
Trustpilot::businessUnit()->invitation()->products(
    [
        new Product([
            'sku' => 'samsung-galaxy-s8',
            'name' => 'Samsung Galaxy S8',
            'brand' => 'Samsung Galaxy',
            'productUrl' => 'https://example.com/products/samsung-galaxy-s8',
            'imageUrl' => 'https://example.com/products/images/samsung-galaxy-s8.jpg',
        ]),
        new Product([
            'sku' => 'samsung-galaxy-s10',
            'name' => 'Samsung Galaxy S10',
            'brand' => 'Samsung Galaxy',
            'productUrl' => 'https://example.com/products/samsung-galaxy-s10',
            'imageUrl' => 'https://example.com/products/images/samsung-galaxy-s10.jpg',
        ]),
    ],
    '#123456', 'John Doe', 'john.doe@example.com',
    'no-reply@business.com', 'Business Name'
);

// Get a list of templates available to be used in invitations.
$templates = Trustpilot::businessUnit()->invitation()->templates();

// Generate a service review invitation link.
$inviteUrl = Trustpilot::businessUnit()->invitation()->generateLink('#123456', 'John Doe', 'john.doe@example.com', 'https://example.com/');

// Delete all invitation data related to the given e-mails.
Trustpilot::businessUnit()->invitation()->deleteByEmails([
    'john.doe@example.com',
    'jane.doe@example.com',
]);

// Delete all invitation data older than 5 years.
Trustpilot::businessUnit()->invitation()->deleteBeforeDate(now()->subYears(5));
```

### Categories

[](#categories)

```
// Get all categories.
$categories = Trustpilot::categories()->get();

// Get categories with a parent of "banking_money".
$categories = Trustpilot::categories()
    ->where('parentId', 'banking_money')
    ->get();

// Get category by id.
$category = Trustpilot::categories()->find('trust_bank');

// Get first three business units with the same category as your business unit.
$businessUnits = Trustpilot::businessUnit()->categories()->first()->businessUnits()->limit(3)->get();
```

Credits
-------

[](#credits)

- [McCaulay Hudson](https://github.com/mccaulay)
- [Juan Lago](https://github.com/juanparati)

License
-------

[](#license)

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

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~134 days

Recently: every ~218 days

Total

11

Last Release

26d ago

Major Versions

9.0 → 10.02023-05-25

10.4 → 11.02024-04-05

11.0 → 12.02025-04-01

12.1 → 13.02026-06-08

PHP version history (3 changes)9.0PHP ^8.0|^8.1

11.0PHP &gt;=8.0

13.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/4caf72b4d969cfb8cdfbdc1d594c85b51c9316caf76b80aa0f9de7e3736cf59f?d=identicon)[juanparati](/maintainers/juanparati)

---

Top Contributors

[![juanparati](https://avatars.githubusercontent.com/u/835173?v=4)](https://github.com/juanparati "juanparati (2 commits)")[![emanueljacob](https://avatars.githubusercontent.com/u/28386816?v=4)](https://github.com/emanueljacob "emanueljacob (1 commits)")[![jmagaro88](https://avatars.githubusercontent.com/u/8763631?v=4)](https://github.com/jmagaro88 "jmagaro88 (1 commits)")

---

Tags

laravelTrustpilot

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/juanparati-trustpilot/health.svg)

```
[![Health](https://phpackages.com/badges/juanparati-trustpilot/health.svg)](https://phpackages.com/packages/juanparati-trustpilot)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M885](/packages/laravel-socialite)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M594](/packages/laravel-boost)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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