PHPackages                             rinvex/laravel-testimonials - 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. [Database &amp; ORM](/categories/database)
4. /
5. rinvex/laravel-testimonials

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

rinvex/laravel-testimonials
===========================

Rinvex Testimonials is a polymorphic Laravel package for managing testimonials. Customers can give you testimonials, and you can approve or disapprove each individually. Testimonials are good for showing the passion and love your service gets from customers, encouraging others to join the hype!

v5.0.1(5y ago)132.6k41MITPHPPHP ^7.4.0 || ^8.0.0

Since Feb 17Pushed 4y ago2 watchersCompare

[ Source](https://github.com/rinvex/laravel-testimonials)[ Packagist](https://packagist.org/packages/rinvex/laravel-testimonials)[ Docs](https://rinvex.com)[ RSS](/packages/rinvex-laravel-testimonials/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (23)Used By (1)

Rinvex Testimonials
===================

[](#rinvex-testimonials)

⚠️ This package is abandoned and no longer maintained. No replacement package was suggested. ⚠️

👉 If you are interested to step on as the main maintainer of this package, please [reach out to me](https://twitter.com/omranic)!

---

**Rinvex Testimonials** is a polymorphic Laravel package for managing testimonials. Customers can give you testimonials, and you can approve or disapprove each individually. Testimonials are good for showing the passion and love your service gets from customers, encouraging others to join the hype!

[![Packagist](https://camo.githubusercontent.com/ed41d489678341d0308f898ace0d49b58dde42f1c45166adb230dd20a5bc501d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696e7665782f6c61726176656c2d74657374696d6f6e69616c732e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/rinvex/laravel-testimonials)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f20b252916ad45c13ff05794d3cc2b814483b0c1190064d5dece30e1ac227bcf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696e7665782f6c61726176656c2d74657374696d6f6e69616c732e7376673f6c6162656c3d5363727574696e697a6572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rinvex/laravel-testimonials/)[![Travis](https://camo.githubusercontent.com/aac6b5cc63a9ee120cd4bbdb0278d0241aba267700a93cdc9272e76100872ac1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696e7665782f6c61726176656c2d74657374696d6f6e69616c732e7376673f6c6162656c3d5472617669734349267374796c653d666c61742d737175617265)](https://travis-ci.org/rinvex/laravel-testimonials)[![StyleCI](https://camo.githubusercontent.com/305d74a43a7e4a7b593a8932cce4e189ac21fbe20593de50a16a23101dadb2bb/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131343933393236342f736869656c64)](https://styleci.io/repos/114939264)[![License](https://camo.githubusercontent.com/a4c71a463e29195b90460af24803ba22922c5963e632154152e9e99e349077c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72696e7665782f6c61726176656c2d74657374696d6f6e69616c732e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/rinvex/laravel-testimonials/blob/develop/LICENSE)

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

[](#installation)

1. Install the package via composer:

    ```
    composer require rinvex/laravel-testimonials
    ```
2. Publish resources (migrations and config files):

    ```
    php artisan rinvex:publish:testimonials
    ```
3. Execute migrations via the following command:

    ```
    php artisan rinvex:migrate:testimonials
    ```
4. Done!

Usage
-----

[](#usage)

Before going through the code samples, we need to clarify the concepts behind this package and how it works. **Rinvex Testimonials** assumes that every testimonial has two relationships, the is the entity giving the testimonial **(called attestant)**, and second is the enity receiving it **(called subject)**. These entities could be anything, each and every testimonial stores `type` and `id` (both form a polymorphic relationship) for **subject** and **attestant**. An entity can give testimonials, receive testimonials, or both. It's up to you to decide.

### Add giving testimonials functionality to your model

[](#add-giving-testimonials-functionality-to-your-model)

To add support for a model to give testimonials simply use the `\Rinvex\Testimonials\Traits\GivesTestimonials` trait:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Rinvex\Testimonials\Traits\GivesTestimonials;

class User extends Model
{
    use GivesTestimonials;
}
```

### Add receiving testimonials functionality to your model

[](#add-receiving-testimonials-functionality-to-your-model)

To add support for a model to receive testimonials simply use the `\Rinvex\Testimonials\Traits\TakesTestimonials` trait:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Rinvex\Testimonials\Traits\TakesTestimonials;

class Company extends Model
{
    use TakesTestimonials;
}
```

Both traits could be used together for the same model without any issues.

### Create a new testimonial

[](#create-a-new-testimonial)

Creating a new testimonial is straight forward, and could be done in many ways, use whatever suits your context. Let's see how could we do that:

```
$user = \App\Models\User::find(1);
$company = \App\Models\Company::find(1);
$testimonial = app('rinvex.testimonials.testimonial');
$testimonialBody = 'I have been using this service as my main learning resource since it went live. I believe it has the best teaching material out there.';

// Create a new testimonial via subject model (attestant, body)
$company->newTestimonial($user, $testimonialBody);

// Create a new testimonial via attestant model (subject, body)
$user->newTestimonial($company, $testimonialBody);

// Create a new testimonial explicitly
$testimonial->make(['body' => $testimonialBody])
            ->subject()->associate($company)
            ->attestant()->associate($user)
            ->save();
```

### Query testimonial models

[](#query-testimonial-models)

You can get more details about a specific testimonial as follows:

```
$testimonial = app('rinvex.testimonials.testimonial')->find(1);

$company = $testimonial->subject; // Get the owning company model
$user = $testimonial->attestant; // Get the owning user model

$testimonialsOfCompany = app('rinvex.testimonials.testimonial')->ofSubject($company)->get(); // Get testimonials of the given company
$recommendationsOfUser = app('rinvex.testimonials.testimonial')->ofAttestant($user)->get(); // Get testimonials of the given user

$company->testimonialsOf($user)->get(); // Get testimonials of the given user
$user->recommendationsOf($company)->get(); // Get testimonials by the user for the given company

$user->recommendations; // Get given testimonials collection
$user->recommendations(); // Get given testimonials query builder

$company->testimonials; // Get received testimonials collection
$company->testimonials(); // Get received testimonials query builder
```

And not surprisingly, the `\Rinvex\Testimonials\Models\Testimonial` model itself extends [Eloquent](https://laravel.com/docs/master/eloquent) so you can manage it fluently as you normally do.

Changelog
---------

[](#changelog)

Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

Support
-------

[](#support)

The following support channels are available at your fingertips:

- [Chat on Slack](https://bit.ly/rinvex-slack)
- [Help on Email](mailto:help@rinvex.com)
- [Follow on Twitter](https://twitter.com/rinvex)

Contributing &amp; Protocols
----------------------------

[](#contributing--protocols)

Thank you for considering contributing to this project! The contribution guide can be found in [CONTRIBUTING.md](CONTRIBUTING.md).

Bug reports, feature requests, and pull requests are very welcome.

- [Versioning](CONTRIBUTING.md#versioning)
- [Pull Requests](CONTRIBUTING.md#pull-requests)
- [Coding Standards](CONTRIBUTING.md#coding-standards)
- [Feature Requests](CONTRIBUTING.md#feature-requests)
- [Git Flow](CONTRIBUTING.md#git-flow)

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

[](#security-vulnerabilities)

If you discover a security vulnerability within this project, please send an e-mail to [help@rinvex.com](help@rinvex.com). All security vulnerabilities will be promptly testimonialed.

About Rinvex
------------

[](#about-rinvex)

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

License
-------

[](#license)

This software is released under [The MIT License (MIT)](LICENSE).

(c) 2016-2021 Rinvex LLC, Some rights reserved.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~52 days

Recently: every ~64 days

Total

21

Last Release

1962d ago

Major Versions

v0.0.3 → v1.0.02018-10-03

v1.0.1 → v2.0.02019-03-03

v2.1.1 → v3.0.02019-09-22

v3.0.2 → v4.0.02020-03-15

v4.1.0 → v5.0.02020-12-22

PHP version history (4 changes)v0.0.1PHP ^7.1.3

v2.0.0PHP ^7.2.0

v4.0.0PHP ^7.4.0

v5.0.1PHP ^7.4.0 || ^8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e54af04bcacb96e00894621335f88df7ed9895b6cc245deffdc9830a21cfe29?d=identicon)[Omranic](/maintainers/Omranic)

---

Top Contributors

[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (152 commits)")

---

Tags

laravelmodeleloquentuserrinvexrecommendationspolymorphictestimonialsattestant

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rinvex-laravel-testimonials/health.svg)

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

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[rinvex/laravel-categories

Rinvex Categories is a polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.

470161.6k3](/packages/rinvex-laravel-categories)[rinvex/laravel-tenants

Rinvex Tenants is a contextually intelligent polymorphic Laravel package, for single db multi-tenancy. You can completely isolate tenants data with ease using the same database, with full power and control over what data to be centrally shared, and what to be tenant related and therefore isolated from others.

823.4k10](/packages/rinvex-laravel-tenants)

PHPackages © 2026

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