Download the PHP package filamerce/filament-comments without Composer

On this page you can find all versions of the php package filamerce/filament-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-comments

Filament Comments

Latest Version on Packagist Total Downloads Stars

Add comments to your Filament Resources.

This package is a fork of [https://github.com/parallax/filament-comments] with merged Pull Requests and support of Laravel 12.

Installation

Install the package via composer:

Publish and run the migrations:

You can publish the config file with:

You can publish the language files with:

Optionally, you can publish the views using

Quickstart

1. Add model trait

First open the eloquent model you wish to add Filament Comments to.

2. Add comments to Filament Resource

There are 3 ways of using this plugin in your Filament Resources:

1. Page actions

Open the page where you want the comments action to appear, this will most likely be the ViewResource page.

Add the CommentsAction to the getHeaderActions() method.

You may customise the page action as you would any other action.

2. Table actions

Open the resource where you want the comments table action to appear.

Add the CommentsAction to the $table->actions() method.

You may customise the table action as you would any other action.

3. Infolist entry

It's also possible to use the comments component within your infolist.

Add the CommentsEntry to the $infolist->schema() method.

Please note that this cannot be used in combination with a comments action on the same page.

Comment sanitization

Comment bodies are written by your panel users and rendered as HTML in every other user's browser, so they are treated as untrusted input. Before a comment is rendered it is passed through an allowlist sanitizer that keeps the formatting the bundled editors produce (bold, italic, lists, links, quotes, code blocks) and drops everything else, including <script>, event handler attributes such as onerror, javascript: URLs and inline style attributes.

If you need a different policy, rebind the sanitizer in a service provider:

[!WARNING] If you published this package's views before v2.0.2, your published comments.blade.php still renders comments unsanitized. Re-publish it, or replace the comment body output with {{ \Filamerce\FilamentComments\Support\CommentSanitizer::render($comment->comment) }}.

Authorisation

By default, all users can view & create comments as well as only delete their own comments.

If you would like to change this behaviour you can create your own eloquent model policy for the Filamerce\FilamentComments\Models\FilamentComment model.

You should define the policy class in the filament-comments config file.

Pruning deleted comments

Comment records are set to be pruned after 30 days of being soft-deleted by default. You may change this value in the config file:

After configuring the model, you should schedule the model:prune Artisan command in your application's Kernel class. Don't forget to explicitly mention the FilamentComment class. You are free to choose the appropriate interval at which this command should be run:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-comments with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0
illuminate/contracts Version ^10.0 | ^11.0 | ^12.0
symfony/html-sanitizer Version ^6.1 | ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package filamerce/filament-comments contains the following files

Loading the files please wait ...