PHPackages                             corepine/reportable - 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. [Templating &amp; Views](/categories/templating)
4. /
5. corepine/reportable

ActiveLibrary[Templating &amp; Views](/categories/templating)

corepine/reportable
===================

Reusable polymorphic reporting for Laravel models with a starter Blade UI.

v0.1.0(1mo ago)00MITPHPPHP ^8.2|^8.3|^8.4

Since Mar 18Pushed 1mo agoCompare

[ Source](https://github.com/corepine/reportable)[ Packagist](https://packagist.org/packages/corepine/reportable)[ RSS](/packages/corepine-reportable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

corepine/reportable
===================

[](#corepinereportable)

Reusable polymorphic reporting for Laravel models with Livewire.

`corepine/reportable` gives you a small reporting foundation that you can reuse across reviews, comments, posts, and any other Eloquent model. It ships with:

- polymorphic `reporter` and `reportable` relations
- `HasReports` and `CanReport` model concerns
- config and enum backed report types and statuses
- a report manager/service for creating and resolving reports
- **Livewire components** for report modal and report inbox with encrypted parameters
- starter Blade components and routes

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

[](#installation)

```
composer require corepine/reportable
php artisan reportable:install --migrate
```

Quick Start
-----------

[](#quick-start)

Add `HasReports` to models that may be reported:

```
use Corepine\Reportable\Models\Concerns\HasReports;

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

Add `CanReport` to the actor model:

```
use Corepine\Reportable\Models\Concerns\CanReport;

class User extends Authenticatable
{
    use CanReport;
}
```

Using Livewire Components
-------------------------

[](#using-livewire-components)

### Report Modal with Encrypted Parameters

[](#report-modal-with-encrypted-parameters)

The package includes a Livewire-powered report modal that automatically encrypts the reportable type and ID for security:

```
{{-- Place the modal component once in your layout --}}

{{-- Use the button component to trigger the modal --}}

```

The button component automatically:

- Encrypts the model type and ID using Laravel's Crypt facade
- Dispatches a Livewire event to open the modal
- Passes encrypted parameters securely

### Manual Usage with Encrypted Parameters

[](#manual-usage-with-encrypted-parameters)

You can also trigger the modal manually using JavaScript:

```
@php
    use Illuminate\Support\Facades\Crypt;
    $encryptedType = Crypt::encryptString($post->getMorphClass());
    $encryptedId = Crypt::encryptString((string) $post->getKey());
@endphp

    Report

{{-- Include modal component --}}

```

### Using the Encryption Helper

[](#using-the-encryption-helper)

```
use Corepine\Reportable\Support\ReportableEncryption;

// Encrypt reportable model
$encrypted = ReportableEncryption::encryptReportable($post);
// Returns: ['encryptedType' => '...', 'encryptedId' => '...']

// Decrypt parameters
$decrypted = ReportableEncryption::decryptReportable($encryptedType, $encryptedId);
// Returns: ['type' => 'App\Models\Post', 'id' => '123']
```

### Reports Index with Livewire

[](#reports-index-with-livewire)

The reports index page uses Livewire for real-time filtering and pagination:

```
{{-- In your layout --}}
@livewire('corepine-reports-index')
```

Or use the included page route:

```
/corepine/reportable/reports

```

### Modal Auto-Close

[](#modal-auto-close)

The Livewire modal automatically closes after a successful report submission and flashes a success message to the session.

Create a report in code:
------------------------

[](#create-a-report-in-code)

```
$user->report($post, 'obscene', [
    'message' => 'This content is inappropriate'
]);
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

52d ago

### Community

Maintainers

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

---

Top Contributors

[![namumakwembo](https://avatars.githubusercontent.com/u/77463693?v=4)](https://github.com/namumakwembo "namumakwembo (1 commits)")

---

Tags

laravelblademoderationreportsreportablecorepine

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/corepine-reportable/health.svg)

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

###  Alternatives

[mati365/ckeditor5-livewire

CKEditor 5 integration for Laravel Livewire

413.9k](/packages/mati365-ckeditor5-livewire)

PHPackages © 2026

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