docs: add README, boost skill, and documentation site

This commit is contained in:
manukminasyan
2026-03-27 00:29:57 +04:00
parent 29fcbd8aec
commit b8d930df1a
25 changed files with 1741 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
title: Getting Started
icon: false

View File

@@ -0,0 +1,52 @@
---
title: Introduction
description: A full-featured commenting system for Filament panels.
navigation:
icon: i-lucide-home
seo:
title: Introduction
description: Learn about Comments - a full-featured commenting system for Filament panels with threaded replies, @mentions, emoji reactions, and real-time updates.
ogImage: /preview.png
---
Welcome to **Comments**, a powerful Laravel package that adds a full-featured commenting system to any Filament panel.
## What is Comments?
Comments provides polymorphic commenting on any Eloquent model with deep Filament integration. Add threaded discussions, @mentions, emoji reactions, file attachments, and real-time notifications to your admin panel with minimal setup.
## Why Choose Comments?
::card-group
:::card
---
icon: i-lucide-messages-square
title: Threaded Discussions
---
Nested replies with configurable depth limits keep conversations organized and easy to follow.
:::
:::card
---
icon: i-lucide-clock
title: Quick Setup
---
Add traits to your models, register the plugin, and you have a working comment system in minutes.
:::
:::card
---
icon: i-lucide-puzzle
title: 3 Integration Patterns
---
Use as a slide-over action, table row action, or inline infolist entry - whatever fits your resource.
:::
:::card
---
icon: i-lucide-bell
title: Built-in Notifications
---
Database and mail notifications with subscription management and auto-subscribe for authors and mentioned users.
:::
::

View File

@@ -0,0 +1,112 @@
---
title: Installation
description: Get started with Comments in minutes.
navigation:
icon: i-lucide-download
seo:
description: Install Comments and add commenting to your Filament resources.
ogImage: /preview.png
---
## Requirements
- **PHP:** 8.2+
- **Laravel:** 12+
- **Filament:** 4.x / 5.x
- **Livewire:** 3.5+ / 4.x
## Quick Setup
::steps
### Install Package
```bash [Terminal]
composer require relaticle/comments
```
### Publish and Run Migrations
```bash [Terminal]
php artisan vendor:publish --tag=comments-migrations
php artisan migrate
```
### Include CSS Assets
Prerequisite: You need a custom Filament theme to include the Comments styles.
::alert{type="warning"}
If you haven't set up a custom theme for Filament, follow the [Filament Docs](https://filamentphp.com/docs/5.x/styling/overview#creating-a-custom-theme) first.
::
Add the plugin's views to your theme CSS file:
```css [resources/css/filament/admin/theme.css]
@source "../../../../vendor/relaticle/comments/resources/views/**/*.blade.php";
```
### Register the Plugin
```php [AdminPanelProvider.php]
use Relaticle\Comments\CommentsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
CommentsPlugin::make(),
]);
}
```
### Set Up Your Models
Add the `HasComments` trait to any model you want to comment on:
```php [app/Models/Project.php]
use Relaticle\Comments\Concerns\HasComments;
use Relaticle\Comments\Contracts\Commentable;
class Project extends Model implements Commentable
{
use HasComments;
}
```
Add the `IsCommenter` trait to your User model:
```php [app/Models/User.php]
use Relaticle\Comments\Concerns\IsCommenter;
use Relaticle\Comments\Contracts\Commenter;
class User extends Authenticatable implements Commenter
{
use IsCommenter;
}
```
### Add to Your Resources
Use the slide-over action on view or edit pages:
```php [app/Filament/Resources/ProjectResource/Pages/ViewProject.php]
use Relaticle\Comments\Filament\Actions\CommentsAction;
protected function getHeaderActions(): array
{
return [
CommentsAction::make(),
];
}
```
::
**Done!** Visit your Filament panel to see comments in action.
## Optional Configuration
| Command | Action |
|---------|--------|
| `php artisan vendor:publish --tag=comments-config` | Publish the configuration file |
| `php artisan vendor:publish --tag=comments-views` | Publish the Blade views for customization |
| `php artisan vendor:publish --tag=comments-translations` | Publish the translation files |

View File

@@ -0,0 +1,12 @@
---
title: Upgrading
description: Upgrade guide for Comments.
navigation:
icon: i-lucide-arrow-up-circle
seo:
description: How to upgrade Comments between versions.
---
## 1.x
This is the initial release of Comments. Future upgrade guides will be documented here as new versions are released.