PHPackages                             mintbridge/eloquent-sentiment - 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. mintbridge/eloquent-sentiment

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

mintbridge/eloquent-sentiment
=============================

An eloquent package for adding sentiment to eloquent models.

0.0.1(10y ago)1256MITPHPPHP &gt;=5.4.0

Since Feb 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mintbridge/eloquent-sentiment)[ Packagist](https://packagist.org/packages/mintbridge/eloquent-sentiment)[ RSS](/packages/mintbridge-eloquent-sentiment/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Eloquent Sentiment
==================

[](#eloquent-sentiment)

Laravel 5 package for adding sentiment to eloquent models.

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

[](#installation)

This package can be installed through Composer.

```
composer require mintbridge/eloquent-sentiment
```

Once installed add the service provider and facade to your app config

```
// config/app.php

'providers' => [
    '...',
    'Mintbridge\EloquentSentiment\SentimentServiceProvider',
];

'aliases' => [
    '...',
    'Sentiment' => 'Mintbridge\EloquentSentiment\SentimentFacade',
];
```

You'll also need to publish and run the migration in order to create the database table.

```
php artisan vendor:publish --provider="Mintbridge\EloquentSentiment\SentimentServiceProvider" --tag="config"
php artisan vendor:publish --provider="Mintbridge\EloquentSentiment\SentimentServiceProvider" --tag="migrations"
php artisan migrate

```

The configuration will be written to `config/eloquent-sentiment.php`. The options have sensible defaults but you should change the user model to match the one used in your application.

Usage
-----

[](#usage)

This package will allow your users to add sentiment to models used in your application. To do so the models that you would like to be sentimentable must use the `Sentimentable` trait and implement `SentimentableInterface`.

```
use Mintbridge\EloquentSentiment\Sentimentable;
use Mintbridge\EloquentSentiment\SentimentableInterface;

class Article extends Eloquent implements SentimentableInterface {

    use Sentimentable;
    ...
}
```

Sentiment can be added to models by using the `SentimentManager` or more easily with the Sentiment facade:

```
$article = Article::find(1);

// add article as a favourite
Sentiment::add('like', $article);

// remove article from by a favourite
Sentiment::remove('like', $article);

// toggle article as being a favourite
Sentiment::toggle('like', $article);
```

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

[](#contributing)

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

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3782d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d692eb428aac3d994513c18ac2c3c1d5b0a3e15f1e0c56661aa14fae8b4a942b?d=identicon)[mintbridge](/maintainers/mintbridge)

---

Tags

laraveleloquentsentimentemoticon

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mintbridge-eloquent-sentiment/health.svg)

```
[![Health](https://phpackages.com/badges/mintbridge-eloquent-sentiment/health.svg)](https://phpackages.com/packages/mintbridge-eloquent-sentiment)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M90](/packages/mongodb-laravel-mongodb)[spatie/laravel-sluggable

Generate slugs when saving Eloquent models

1.5k12.4M294](/packages/spatie-laravel-sluggable)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8723.1M23](/packages/yajra-laravel-oci8)

PHPackages © 2026

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