PHPackages                             risul/laravel-like-comment - 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. risul/laravel-like-comment

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

risul/laravel-like-comment
==========================

Ajax based site wide like and comment system for laravel

v2.0.1(6y ago)1116.9k36[9 issues](https://github.com/risul3/laravel-like-comment/issues)MITPHP

Since Aug 26Pushed 1y ago15 watchersCompare

[ Source](https://github.com/risul3/laravel-like-comment)[ Packagist](https://packagist.org/packages/risul/laravel-like-comment)[ RSS](/packages/risul-laravel-like-comment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/6e1b58cb4e5f77e86b93cc01822f58425e68d69eea92f11fd60fe5fab2450599/68747470733a2f2f706f7365722e707567782e6f72672f726973756c2f6c61726176656c2d6c696b652d636f6d6d656e742f762f737461626c65)](https://packagist.org/packages/risul/laravel-like-comment)[![Total Downloads](https://camo.githubusercontent.com/6622e32a38da9e4bcba155725b324d4950f2d3e27e123d33b3445161f24c4f8d/68747470733a2f2f706f7365722e707567782e6f72672f726973756c2f6c61726176656c2d6c696b652d636f6d6d656e742f646f776e6c6f616473)](https://packagist.org/packages/risul/laravel-like-comment)[![License](https://camo.githubusercontent.com/a35b9eaa9ea1a5562cff204445d6881678caaba4d7f929bc24dd89ad196aba58/68747470733a2f2f706f7365722e707567782e6f72672f726973756c2f6c61726176656c2d6c696b652d636f6d6d656e742f6c6963656e7365)](https://packagist.org/packages/risul/laravel-like-comment)

Laravel like comment
====================

[](#laravel-like-comment)

Laravel Like Comment is a lightweight and developer-friendly package that makes it easy to add "like" and "comment" features to any Laravel model. Whether you're building a blog, forum, or social platform, this package handles the heavy lifting so you can focus on your core application.

It supports polymorphic relationships out of the box, allowing you to attach likes and comments to multiple models effortlessly. With clean API methods and customizable migrations, it's built to be both powerful and flexible.

Perfect for projects that need quick social interaction features without reinventing the wheel.

Features
--------

[](#features)

- Like
- Dislike
- Comment
- Comment voting
- User avatar in comment

Demo
----

[](#demo)

[Try it](http://risul.herokuapp.com/laravel-like-comment)

[Watch](https://www.youtube.com/watch?v=06kcpsnN-bo)

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

[](#installation)

Run

```
composer require risul/laravel-like-comment
```

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

[](#configuration)

Add

```
risul\LaravelLikeComment\LikeCommentServiceProvider::class

```

in your `service providerr` list.

To copy views and migrations run

```
php artisan vendor:publish

```

Run

```
php artisan migrate

```

It will create like and comment table.

Add this style links to your view head

```

```

Add jquery and script

```

```

In `config/laravelLikeComment.php` add user model path

```
'userModel' => 'App\User'
```

Add following code in your user model

```
    /**
     * Return the user attributes.

     * @return array
     */
    public static function getAuthor($id)
    {
        $user = self::find($id);
        return [
            'id'     => $user->id,
            'name'   => $user->name,
            'email'  => $user->email,
            'url'    => '',  // Optional
            'avatar' => 'gravatar',  // Default avatar
            'admin'  => $user->role === 'admin', // bool
        ];
    }
```

Usage
-----

[](#usage)

Add this line at where you want to integrate Like

```
@include('laravelLikeComment::like', ['like_item_id' => 'image_31'])
```

`like_item_id:` This is the id of the item,page or model for which the like will be used

Add this line where you want to integrate Comment

```
@include('laravelLikeComment::comment', ['comment_item_id' => 'video_12'])
```

`comment_item_id:` This is the id of the item, page, or model for which the comment will be used

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity67

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 ~222 days

Recently: every ~278 days

Total

6

Last Release

2430d ago

Major Versions

v1.0.3 → v2.0.02017-07-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/601545?v=4)[Risul Islam](/maintainers/risul)[@risul](https://github.com/risul)

---

Top Contributors

[![risul3](https://avatars.githubusercontent.com/u/5075348?v=4)](https://github.com/risul3 "risul3 (65 commits)")

---

Tags

ajaxlaravelphplaravelajaxcommentlike

### Embed Badge

![Health badge](/badges/risul-laravel-like-comment/health.svg)

```
[![Health](https://phpackages.com/badges/risul-laravel-like-comment/health.svg)](https://phpackages.com/packages/risul-laravel-like-comment)
```

###  Alternatives

[ziffmedia/nova-select-plus

A Nova select field for simple and complex select inputs

96578.4k1](/packages/ziffmedia-nova-select-plus)[openskill/datatable

This is a Laravel 5 package for the server and client side of DataTables (http://datatables.net/)

5511.2k1](/packages/openskill-datatable)[razorcreations/ajax-field

A searchable AJAX powered field for Laravel Nova 3 and 4.

13133.2k](/packages/razorcreations-ajax-field)[efficiently/jquery-laravel

This package provides jQuery and the jQuery-ujs driver for your Laravel &gt;= 6 application.

1311.0k1](/packages/efficiently-jquery-laravel)[mtrdesign/krait

Krait provides an easy way to create Ajax Datatables.

101.9k](/packages/mtrdesign-krait)

PHPackages © 2026

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