PHPackages                             phpdominicana/reactify - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpdominicana/reactify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpdominicana/reactify
======================

Reactify a easy way to add likes to comment, photos, etc.

v1.4.0(10mo ago)1131MITPHPPHP ^8.2

Since Apr 21Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/PHP-Dominicana/Reactify)[ Packagist](https://packagist.org/packages/phpdominicana/reactify)[ Docs](https://github.com/elminson/reactify)[ RSS](/packages/phpdominicana-reactify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (8)Versions (6)Used By (0)

Reactify an easy way to add likes to comment, photos, etc.
==========================================================

[](#reactify-an-easy-way-to-add-likes-to-comment-photos-etc)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b60f41df41382d970d95362fcc27f0c3301e116722ce825235493c483f38cacc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870646f6d696e6963616e612f72656163746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpdominicana/reactify)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7d30557688ce06801005ee48062de35a2f0a927a1faea1900a751581d1de997d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870646f6d696e6963616e612f72656163746966792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/phpdominicana/reactify/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/30c94f5f9107d4d1cc82cefa8945fba0a7a8a4892ce74d70dfcec9539a2df7f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870646f6d696e6963616e612f72656163746966792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/phpdominicana/reactify/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d3629e617a9c698831f9a695f55bf872f791a9594217e28faa7ccd4f9014300f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706870646f6d696e6963616e612f72656163746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpdominicana/reactify)

Add reactions (like 👍, dislike 👎, love ❤️, haha 😄, etc.) to any Eloquent model in Laravel. Perfect for blogs, comments, posts, reviews, and more.

Compatibility
-------------

[](#compatibility)

`reactify` supports Laravel 12 and Laravel 13.

- Laravel 12: PHP 8.2+
- Laravel 13: PHP 8.3+

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

[](#installation)

You can install the package via composer:

```
composer require phpdominicana/reactify
```

Then rebuild Laravel's package manifest:

```
php artisan package:discover
```

You may publish the migration file with:

```
php artisan vendor:publish --tag="reactify-migrations"
```

And run migrations with:

```
php artisan migrate
```

You may publish the config file with:

```
php artisan vendor:publish --tag="reactify-config"
```

Usage
-----

[](#usage)

### Add the trait to the model you want to add reactions.

[](#add-the-trait-to-the-model-you-want-to-add-reactions)

```
use App\Traits\HasReactions;

class Post extends Model
{
    use HasReactions;
}
```

### Sample usage

[](#sample-usage)

```
$post->react($userId, Reaction::LIKE);
$post->unReact($userId, Reaction::LIKE);
$post->reactions(Reaction::LIKE); // returns integer count
```

Get total reactions for all types

```
$post->reactionCounter; // returns a ReactionCounter model with all counts
```

### Available Reaction Types

[](#available-reaction-types)

You can define your own reactions via constants:

```
enum Reaction: string
{
    case LIKE = 'like';
    case DISLIKE = 'dislike';
    case LOVE = 'love';
    case ANGRY = 'angry';
    case SAD = 'sad';
    case HAPPY = 'happy';
    case WOW = 'wow';
    case CARE = 'care';
    case THANKFUL = 'thankful';
    case SUPPORT = 'support';
    case LAUGH = 'laugh';
    case CONFUSED = 'confused';
    case HUG = 'hug';
    case KISS = 'kiss';
    case SMILE = 'smile';
    case HEART = 'heart';
    case STAR = 'star';
    case THUMBS_UP = 'thumbs_up';
    case THUMBS_DOWN = 'thumbs_down';
    case CLAP = 'clap';
    case BRAVO = 'bravo';
    case CELEBRATE = 'celebrate';
    case EYES = 'eyes';
    case HANDSHAKE = 'handshake';
    case PRAY = 'pray';
    case SALUTE = 'salute';
    case TROPHY = 'trophy';
    case WELCOME = 'welcome';
    case WINK = 'wink';
    case YUMMY = 'yummy';
    case COOL = 'cool';
    case DROOL = 'drool';
    case FLOWER = 'flower';
    case GIFT = 'gift';
    case GOOD = 'good';
    case HIGH_FIVE = 'high_five';
    case HUGS = 'hugs';
    case KISSES = 'kisses';
    case LOVE_YOU = 'love_you';
    case MISS_YOU = 'miss_you';
    case NO = 'no';
    case OK = 'ok';
    case OK_HAND = 'ok_hand';
    case PARTY = 'party';
    case PEACE = 'peace';
    case PIZZA = 'pizza';
    case PRIDE = 'pride';
    case QUESTION = 'question';
    case RAINBOW = 'rainbow';
    case ROCKET = 'rocket';
    case SICK = 'sick';
    case SORRY = 'sorry';
    case SPARKLES = 'sparkles';
    case STRONG = 'strong';
    case SUN = 'sun';
    case THANK_YOU = 'thank_you';
    case THINKING = 'thinking';
}
```

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)

- [PHP Dominicana](https://github.com/elminson)
- [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

Maintenance73

Regular maintenance activity

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~108 days

Total

5

Last Release

324d ago

### Community

Maintainers

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

---

Top Contributors

[![elminson](https://avatars.githubusercontent.com/u/2476286?v=4)](https://github.com/elminson "elminson (12 commits)")[![masterfermin02](https://avatars.githubusercontent.com/u/4625540?v=4)](https://github.com/masterfermin02 "masterfermin02 (6 commits)")

---

Tags

laravelPHPDominicanareactify

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/phpdominicana-reactify/health.svg)

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

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[glhd/hooks

1726.6k](/packages/glhd-hooks)

PHPackages © 2026

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