PHPackages                             businesstilto/commentable - 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. businesstilto/commentable

ActiveLibrary

businesstilto/commentable
=========================

An extensive and very customizable package that adds commenting in Filament v4.5 and newer.

v0.3.6(1mo ago)111.3k↓13.3%7MITPHPPHP ^8.2CI failing

Since Jan 23Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/businesstilto/commentable)[ Packagist](https://packagist.org/packages/businesstilto/commentable)[ Docs](https://github.com/businesstilto/commentable)[ GitHub Sponsors](https://github.com/businesstilto)[ RSS](/packages/businesstilto-commentable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (28)Versions (21)Used By (0)

 [  ![cover](https://raw.githubusercontent.com/businesstilto/commentable/refs/heads/main/cover.webp)  ](https://tilto.nl)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3559619365029e783a13a4ec8775cf5d48a037cc95d6c7cb605fe7b47f62f45a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627573696e65737374696c746f2f636f6d6d656e7461626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/businesstilto/commentable)[![Software License](https://camo.githubusercontent.com/9897f4467850972a38c7db9a4d38280b8fcdac0ada00e9c8c0a72ecfa8551653/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2cf0769c6612faa43c3c029401f861b4a026e755eb2d852d63370ce4ccc8767a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f627573696e65737374696c746f2f636f6d6d656e7461626c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/businesstilto/commentable)

An extensive and very customizable package that adds commenting in Filament v4.5 and newer.

Inspired by and built upon code from the [Kirschbaum Commentions package](https://github.com/kirschbaum-development/commentions), but takes a different approach to commenting in Filament.

Preview
-------

[](#preview)

 [  ![preview](https://raw.githubusercontent.com/businesstilto/commentable/refs/heads/main/preview.png)  ](https://tilto.nl)

Prerequisites
-------------

[](#prerequisites)

- Laravel 11.x/12.x
- PHP 8.2+
- Filament 4.5+

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Setting up your models](#setting-up-your-models)
        - [Implement the Commenter contract](#1-implement-the-commenter-contract)
        - [Implement the Commentable contract](#2-implement-the-commentable-contract)
    - [Custom policy](#custom-policy)
    - [Listening for comment creation events](#listening-for-comment-creation-events)
    - [Comment Component](#comment-component)
        - [Button position](#button-position)
        - [Toolbar buttons](#toolbar-buttons)
        - [Markdown Editor](#markdown-editor)
        - [Mentions](#mentions)
        - [File Attachments](#file-attachments)
        - [Polling](#polling)
        - [Reactions](#reactions)
        - [Replies](#replies)
- [Styling](#styling)
    - [Behavior](#behavior)
- [Testing](#testing)
- [Alternatives](#alternatives)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require businesstilto/commentable
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="commentable-migrations"
php artisan migrate
```

You can publish the config file with:

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

You can publish the translation files with:

```
php artisan vendor:publish --tag="commentable-translations"
```

Optionally, you can publish the views using:

```
php artisan vendor:publish --tag="commentable-views"
```

This is the contents of the published config file:

```
